diff options
continue rename selectedAccount to selectedAddress
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/inpage.js | 4 | ||||
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 10 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 8 | ||||
-rw-r--r-- | app/scripts/transaction-manager.js | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index 42332d92e..599604a82 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -50,9 +50,9 @@ reloadStream.once('data', triggerReload) // }) // endOfStream(pingStream, triggerReload) -// set web3 defaultAcount +// set web3 defaultAccount inpageProvider.publicConfigStore.subscribe(function (state) { - web3.eth.defaultAccount = state.selectedAccount + web3.eth.defaultAccount = state.PreferencesController.selectedAddress }) // diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 066916b4d..faecac137 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -63,20 +63,20 @@ function MetamaskInpageProvider (connectionStream) { MetamaskInpageProvider.prototype.send = function (payload) { const self = this - let selectedAccount + let selectedAddress let result = null switch (payload.method) { case 'eth_accounts': // read from localStorage - selectedAccount = self.publicConfigStore.getState().selectedAccount - result = selectedAccount ? [selectedAccount] : [] + selectedAddress = self.publicConfigStore.getState().selectedAddress + result = selectedAddress ? [selectedAddress] : [] break case 'eth_coinbase': // read from localStorage - selectedAccount = self.publicConfigStore.getState().selectedAccount - result = selectedAccount || '0x0000000000000000000000000000000000000000' + selectedAddress = self.publicConfigStore.getState().selectedAddress + result = selectedAddress break case 'eth_uninstallFilter': diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index e081188ce..fc7df5137 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -126,8 +126,8 @@ module.exports = class MetamaskController extends EventEmitter { rpcUrl: this.configManager.getCurrentRpcAddress(), // account mgmt getAccounts: (cb) => { - let selectedAccount = this.preferencesController.getSelectedAddress() - let result = selectedAccount ? [selectedAccount] : [] + let selectedAddress = this.preferencesController.getSelectedAddress() + let result = selectedAddress ? [selectedAddress] : [] cb(null, result) }, // tx signing @@ -154,9 +154,9 @@ module.exports = class MetamaskController extends EventEmitter { ) function selectPublicState(state) { - const result = { selectedAccount: undefined } + const result = { selectedAddress: undefined } try { - result.selectedAccount = state.KeyringController.selectedAccount + result.selectedAddress = state.KeyringController.selectedAddress } catch (_) {} return result } diff --git a/app/scripts/transaction-manager.js b/app/scripts/transaction-manager.js index c7d4686f3..d69dab1d7 100644 --- a/app/scripts/transaction-manager.js +++ b/app/scripts/transaction-manager.js @@ -25,11 +25,11 @@ module.exports = class TransactionManager extends EventEmitter { } getState () { - var selectedAccount = this.getSelectedAddress() + var selectedAddress = this.getSelectedAddress() return { transactions: this.getTxList(), unconfTxs: this.getUnapprovedTxList(), - selectedAccountTxList: this.getFilteredTxList({metamaskNetworkId: this.getNetwork(), from: selectedAccount}), + selectedAddressTxList: this.getFilteredTxList({metamaskNetworkId: this.getNetwork(), from: selectedAddress}), } } |