diff options
author | HackyMiner <hackyminer@gmail.com> | 2018-10-26 16:26:43 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-10-26 16:26:43 +0800 |
commit | 54a8ade2669cb5f8f046509873bc2a9c25425847 (patch) | |
tree | aaf40ae8168848b89365647bb863d0c967932ef8 /test/unit/app/controllers | |
parent | eaca9a0e8a6a8e65a4dd099c8f860a9616b7360e (diff) | |
download | tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.tar tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.tar.gz tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.tar.bz2 tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.tar.lz tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.tar.xz tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.tar.zst tangerine-wallet-browser-54a8ade2669cb5f8f046509873bc2a9c25425847.zip |
Add support for RPC endpoints with custom chain IDs (#5134)
Diffstat (limited to 'test/unit/app/controllers')
-rw-r--r-- | test/unit/app/controllers/network-contoller-test.js | 2 | ||||
-rw-r--r-- | test/unit/app/controllers/preferences-controller-test.js | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/test/unit/app/controllers/network-contoller-test.js b/test/unit/app/controllers/network-contoller-test.js index 822311931..7959e6cc1 100644 --- a/test/unit/app/controllers/network-contoller-test.js +++ b/test/unit/app/controllers/network-contoller-test.js @@ -47,7 +47,7 @@ describe('# Network Controller', function () { describe('#setNetworkState', function () { it('should update the network', function () { - networkController.setNetworkState(1) + networkController.setNetworkState(1, 'rpc') const networkState = networkController.getNetworkState() assert.equal(networkState, 1, 'network is 1') }) diff --git a/test/unit/app/controllers/preferences-controller-test.js b/test/unit/app/controllers/preferences-controller-test.js index 7f2804a83..c64c47ae9 100644 --- a/test/unit/app/controllers/preferences-controller-test.js +++ b/test/unit/app/controllers/preferences-controller-test.js @@ -487,20 +487,20 @@ describe('preferences controller', function () { describe('on updateFrequentRpcList', function () { it('should add custom RPC url to state', function () { - preferencesController.addToFrequentRpcList('rpc_url') - preferencesController.addToFrequentRpcList('http://localhost:8545') - assert.deepEqual(preferencesController.store.getState().frequentRpcList, ['rpc_url']) - preferencesController.addToFrequentRpcList('rpc_url') - assert.deepEqual(preferencesController.store.getState().frequentRpcList, ['rpc_url']) + preferencesController.addToFrequentRpcList('rpc_url', 1) + preferencesController.addToFrequentRpcList('http://localhost:8545', 1) + assert.deepEqual(preferencesController.store.getState().frequentRpcListDetail, [{ rpcUrl: 'rpc_url', chainId: 1, ticker: 'ETH', nickname: '' }] ) + preferencesController.addToFrequentRpcList('rpc_url', 1) + assert.deepEqual(preferencesController.store.getState().frequentRpcListDetail, [{ rpcUrl: 'rpc_url', chainId: 1, ticker: 'ETH', nickname: '' }] ) }) it('should remove custom RPC url from state', function () { - preferencesController.addToFrequentRpcList('rpc_url') - assert.deepEqual(preferencesController.store.getState().frequentRpcList, ['rpc_url']) + preferencesController.addToFrequentRpcList('rpc_url', 1) + assert.deepEqual(preferencesController.store.getState().frequentRpcListDetail, [{ rpcUrl: 'rpc_url', chainId: 1, ticker: 'ETH', nickname: '' }] ) preferencesController.removeFromFrequentRpcList('other_rpc_url') preferencesController.removeFromFrequentRpcList('http://localhost:8545') preferencesController.removeFromFrequentRpcList('rpc_url') - assert.deepEqual(preferencesController.store.getState().frequentRpcList, []) + assert.deepEqual(preferencesController.store.getState().frequentRpcListDetail, []) }) }) }) |