diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-09 01:06:41 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-09 01:06:41 +0800 |
commit | cf2268c3d29d97afa22cd11663bb6e3e74c09b5a (patch) | |
tree | 1afca345c3276d7edb4ed07309dff8985f71b628 /app | |
parent | 4562e41d33dfe81e305c20583983fba528ee1a9d (diff) | |
download | tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.tar tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.tar.gz tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.tar.bz2 tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.tar.lz tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.tar.xz tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.tar.zst tangerine-wallet-browser-cf2268c3d29d97afa22cd11663bb6e3e74c09b5a.zip |
Nodeify and promisify calls to background.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/metamask-controller.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 3b3329b58..536891dc6 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -244,8 +244,6 @@ module.exports = class MetamaskController extends EventEmitter { return { // etc getState: (cb) => cb(null, this.getState()), - setDefaultRpc: this.setDefaultRpc.bind(this), - setCustomRpc: this.setCustomRpc.bind(this), setProviderType: this.setProviderType.bind(this), useEtherscanProvider: this.useEtherscanProvider.bind(this), setCurrentCurrency: this.setCurrentCurrency.bind(this), @@ -266,6 +264,8 @@ module.exports = class MetamaskController extends EventEmitter { // PreferencesController setSelectedAddress: nodeify(preferencesController.setSelectedAddress).bind(preferencesController), + setDefaultRpc: nodeify(this.setDefaultRpc).bind(this), + setCustomRpc: nodeify(this.setCustomRpc).bind(this), // KeyringController setLocked: nodeify(keyringController.setLocked).bind(keyringController), @@ -666,6 +666,7 @@ module.exports = class MetamaskController extends EventEmitter { this.configManager.setRpcTarget('http://localhost:8545') extension.runtime.reload() this.lookupNetwork() + return Promise.resolve('http://localhost:8545') } setCustomRpc (rpcTarget, rpcList) { @@ -674,6 +675,7 @@ module.exports = class MetamaskController extends EventEmitter { .then(() => { extension.runtime.reload() this.lookupNetwork() + return Promise.resolve(rpcTarget) }) } |