Skip to content

Commit

Permalink
Merge pull request #339 from cosmos/fabo/336-return-the-nodeip
Browse files Browse the repository at this point in the history
readded the node ip to the node object
  • Loading branch information
jbibla authored Jan 9, 2018
2 parents 4c770fe + 53636cd commit 3debcbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/renderer/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = function (nodeIP) {
let node = new RestClient(RELAY_SERVER)

Object.assign(node, {
nodeIP,
lcdConnected: () => node.listKeys()
.then(() => true, () => false),

Expand Down
5 changes: 5 additions & 0 deletions test/unit/specs/node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ describe('LCD Connector', () => {
global.fetch = fetch
})

it('should provide the nodeIP', () => {
let node = LCDConnector('1.1.1.1')
expect(node.nodeIP).toBe('1.1.1.1')
})

it('should return a mockClient if setting COSMOS_UI_ONLY', () => {
process.env.COSMOS_UI_ONLY = 'true'
let node = LCDConnector('1.1.1.1')
Expand Down

0 comments on commit 3debcbd

Please sign in to comment.