Skip to content

Commit

Permalink
Merge pull request #57 from Lamden/v2-updates
Browse files Browse the repository at this point in the history
output version from getNetwork
  • Loading branch information
JeffWScott authored Sep 8, 2022
2 parents 6aa973d + edaa561 commit 6040a4a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist/cjs/lamden.js
Original file line number Diff line number Diff line change
Expand Up @@ -88006,6 +88006,7 @@ class Network {
blockservice_hosts: this.blockservice.hosts,
url: this.url,
online: this.online,
version: this.version
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/lamden.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lamden-js",
"version": "3.7.0",
"version": "3.7.5",
"description": "A javascript implementaion for creating wallets, submitting transactions and interacting with masternodes on the Lamden Blockchain.",
"main": "dist/cjs/lamden.js",
"module": "dist/esm/lamden.js",
Expand Down
1 change: 1 addition & 0 deletions src/js/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class Network {
blockservice_hosts: this.blockservice.hosts,
url: this.url,
online: this.online,
version: this.version
};
}
}
17 changes: 17 additions & 0 deletions test/network-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,21 @@ describe("Test Netowrk class", () => {
await network.ping((status) => checkResult(status));
});
});
context("getNetworkInfo()", () => {
it("returns proper values", async () => {
let networkInfo = copyObject(goodNetwork);
networkInfo.version = 2
let network = new Lamden.Network(networkInfo);

expect(Object.keys(network.getNetworkInfo()).length).to.be(8)
expect(network.host).to.exist
expect(network.url).to.exist
expect(network.type).to.exist
expect(network.name).to.exist
expect(network.lamden).to.exist
expect(network.blockExplorer).to.exist
expect(network.classname).to.exist
expect(network.version).to.exist
})
})
});

0 comments on commit 6040a4a

Please sign in to comment.