Skip to content

Commit

Permalink
Merge pull request #5 from Adamant-im/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
adamant-al authored May 31, 2020
2 parents b42d352 + 7d75e16 commit 8561902
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Add current version of ADAMANT JavaScript API library in project's `package.json

``` json
"dependencies": {
"adamant-api": "^0.5.2",
"adamant-api": "^0.5.3",
...
```

Expand Down
12 changes: 8 additions & 4 deletions helpers/wsClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ module.exports = {
socketAddress() {
const node = this.useFastest ? this.fastestNode() : this.randomNode();
let socketUrl = this.wsType + "://";
if (this.wsType === "ws")
socketUrl = socketUrl + node.ip + ":" + node.wsPort
else
socketUrl = socketUrl + node.url + ":" + node.wsPort;
if (this.wsType === "ws") {
let host = node.ip;
if (!host || host === undefined)
host = node.url;
socketUrl = socketUrl + host + ":" + node.wsPort
} else {
socketUrl = socketUrl + node.url; // no port if wss
}
return socketUrl;
},

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adamant-api",
"version": "0.5.2",
"version": "0.5.3",
"description": "\"REST API for ADAMANT Blockchain\"",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 8561902

Please sign in to comment.