aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-31 07:25:12 +0800
committerkumavis <aaron@kumavis.me>2017-01-31 07:25:12 +0800
commit2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1 (patch)
treed42ef1e2402cdaebcad3f72f6887b5e3999b3c95 /app
parentf9b31fe2c3a43339a4519761e4c8b2f3813e85e0 (diff)
downloadtangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.tar
tangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.tar.gz
tangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.tar.bz2
tangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.tar.lz
tangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.tar.xz
tangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.tar.zst
tangerine-wallet-browser-2fa60cfcbfdeb43599007f0dd26fd44a4beec8f1.zip
continue rename selectedAccount to selectedAddress
Diffstat (limited to 'app')
-rw-r--r--app/scripts/inpage.js4
-rw-r--r--app/scripts/lib/inpage-provider.js10
-rw-r--r--app/scripts/metamask-controller.js8
-rw-r--r--app/scripts/transaction-manager.js4
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}),
}
}