diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-02-10 11:04:17 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-02-10 11:04:17 +0800 |
commit | f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc (patch) | |
tree | 21d5e002c73bd28d38dd37e37f1a8fb0fd2c9c07 | |
parent | 65c84ac4b2a8a4355bff63690d34e52a4a45a561 (diff) | |
parent | 01e43c789c29668dafb718aa68d9eee76788298b (diff) | |
download | tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.tar tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.tar.gz tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.tar.bz2 tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.tar.lz tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.tar.xz tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.tar.zst tangerine-wallet-browser-f9601ac2dd4d56f7fc02f33a0a442177bac7a5bc.zip |
Merge branch 'dev' into disclaimer-notify
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 5 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 55c60e185..1d1a2370b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Current Master +- net_version has been made synchronous. ## 3.2.1 2017-2-8 diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index faecac137..92936de2f 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -84,6 +84,11 @@ MetamaskInpageProvider.prototype.send = function (payload) { result = true break + case 'net_version': + let networkVersion = self.publicConfigStore.getState().networkVersion + result = networkVersion + break + // throw not-supported Error default: var link = 'https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#dizzy-all-async---think-of-metamask-as-a-light-client' diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 6830bd947..29b13dc62 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -176,7 +176,7 @@ module.exports = class MetamaskController extends EventEmitter { // sync publicConfigStore with transform pipe( this.store, - storeTransform(selectPublicState), + storeTransform(selectPublicState.bind(this)), publicConfigStore ) @@ -184,6 +184,7 @@ module.exports = class MetamaskController extends EventEmitter { const result = { selectedAddress: undefined } try { result.selectedAddress = state.PreferencesController.selectedAddress + result.networkVersion = this.getNetworkState() } catch (_) {} return result } |