aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-22 08:21:16 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-11-22 08:21:16 +0800
commitf5b0795ac5582dd53de728479cf47c43eabfe67c (patch)
tree9b03db0e3a5d3dfd913abcad6cfbadaff71531d6 /app
parent9123e70434fcd35dcb79a587e6d5c00734cb99e4 (diff)
downloadtangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.tar
tangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.tar.gz
tangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.tar.bz2
tangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.tar.lz
tangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.tar.xz
tangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.tar.zst
tangerine-wallet-browser-f5b0795ac5582dd53de728479cf47c43eabfe67c.zip
change all instances of selectedAddress to selectedAccount.
Diffstat (limited to 'app')
-rw-r--r--app/scripts/inpage.js2
-rw-r--r--app/scripts/keyring-controller.js3
-rw-r--r--app/scripts/lib/inpage-provider.js10
-rw-r--r--app/scripts/metamask-controller.js10
4 files changed, 12 insertions, 13 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index 9d6fc96de..68c6165c8 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -50,7 +50,7 @@ endOfStream(pingStream, triggerReload)
// set web3 defaultAcount
inpageProvider.publicConfigStore.subscribe(function (state) {
- web3.eth.defaultAccount = state.selectedAddress
+ web3.eth.defaultAccount = state.selectedAccount
})
//
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 0d906eba1..b29150267 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -61,7 +61,6 @@ module.exports = class KeyringController extends EventEmitter {
transactions: this.configManager.getTxList(),
unconfMsgs: messageManager.unconfirmedMsgs(),
messages: messageManager.getMsgList(),
- selectedAddress: address,
selectedAccount: address,
shapeShiftTxList: this.configManager.getShapeShiftTxList(),
currentFiat: this.configManager.getCurrentFiat(),
@@ -329,7 +328,7 @@ module.exports = class KeyringController extends EventEmitter {
}, [])
}
- setSelectedAddress (address, cb) {
+ setSelectedAccount (address, cb) {
var addr = normalize(address)
this.configManager.setSelectedAccount(addr)
cb(null, addr)
diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js
index 034812b6a..7179ae978 100644
--- a/app/scripts/lib/inpage-provider.js
+++ b/app/scripts/lib/inpage-provider.js
@@ -66,20 +66,20 @@ function MetamaskInpageProvider (connectionStream) {
MetamaskInpageProvider.prototype.send = function (payload) {
const self = this
- let selectedAddress
+ let selectedAccount
let result = null
switch (payload.method) {
case 'eth_accounts':
// read from localStorage
- selectedAddress = self.publicConfigStore.get('selectedAddress')
- result = selectedAddress ? [selectedAddress] : []
+ selectedAccount = self.publicConfigStore.get('selectedAddress')
+ result = selectedAccount ? [selectedAccount] : []
break
case 'eth_coinbase':
// read from localStorage
- selectedAddress = self.publicConfigStore.get('selectedAddress')
- result = selectedAddress || '0x0000000000000000000000000000000000000000'
+ selectedAccount = self.publicConfigStore.get('selectedAddress')
+ result = selectedAccount || '0x0000000000000000000000000000000000000000'
break
// throw not-supported Error
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 951918460..d230b3483 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -67,7 +67,7 @@ module.exports = class MetamaskController {
addNewKeyring: keyringController.addNewKeyring.bind(keyringController),
addNewAccount: keyringController.addNewAccount.bind(keyringController),
submitPassword: keyringController.submitPassword.bind(keyringController),
- setSelectedAddress: keyringController.setSelectedAddress.bind(keyringController),
+ setSelectedAccount: keyringController.setSelectedAccount.bind(keyringController),
approveTransaction: keyringController.approveTransaction.bind(keyringController),
cancelTransaction: keyringController.cancelTransaction.bind(keyringController),
signMessage: keyringController.signMessage.bind(keyringController),
@@ -125,8 +125,8 @@ module.exports = class MetamaskController {
rpcUrl: this.configManager.getCurrentRpcAddress(),
// account mgmt
getAccounts: (cb) => {
- var selectedAddress = this.configManager.getSelectedAccount()
- var result = selectedAddress ? [selectedAddress] : []
+ var selectedAccount = this.configManager.getSelectedAccount()
+ var result = selectedAccount ? [selectedAccount] : []
cb(null, result)
},
// tx signing
@@ -177,14 +177,14 @@ module.exports = class MetamaskController {
// keyringController substate
function keyringControllerToPublic (state) {
return {
- selectedAddress: state.selectedAddress,
+ selectedAccount: state.selectedAccount,
}
}
// config substate
function configToPublic (state) {
return {
provider: state.provider,
- selectedAddress: state.selectedAccount,
+ selectedAccount: state.selectedAccount,
}
}
// dump obj into store