diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/accounts/account-list-item.js | 2 | ||||
-rw-r--r-- | ui/app/accounts/index.js | 8 | ||||
-rw-r--r-- | ui/app/actions.js | 8 | ||||
-rw-r--r-- | ui/app/components/pending-msg-details.js | 2 | ||||
-rw-r--r-- | ui/app/components/pending-tx-details.js | 2 | ||||
-rw-r--r-- | ui/app/conf-tx.js | 8 | ||||
-rw-r--r-- | ui/app/reducers/app.js | 2 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 1 | ||||
-rw-r--r-- | ui/example.js | 8 |
9 files changed, 20 insertions, 21 deletions
diff --git a/ui/app/accounts/account-list-item.js b/ui/app/accounts/account-list-item.js index 4e0d69ed7..ef7b749e4 100644 --- a/ui/app/accounts/account-list-item.js +++ b/ui/app/accounts/account-list-item.js @@ -16,7 +16,7 @@ function AccountListItem () { AccountListItem.prototype.render = function () { const identity = this.props.identity - var isSelected = this.props.selectedAddress === identity.address + var isSelected = this.props.selectedAccount === identity.address var account = this.props.accounts[identity.address] const selectedClass = isSelected ? '.selected' : '' diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js index 2e8321a77..8035ee6ab 100644 --- a/ui/app/accounts/index.js +++ b/ui/app/accounts/index.js @@ -19,7 +19,7 @@ function mapStateToProps (state) { accounts: state.metamask.accounts, identities: state.metamask.identities, unconfTxs: state.metamask.unconfTxs, - selectedAddress: state.metamask.selectedAddress, + selectedAccount: state.metamask.selectedAccount, scrollToBottom: state.appState.scrollToBottom, pending, } @@ -72,7 +72,7 @@ AccountsScreen.prototype.render = function () { return h(AccountListItem, { key: `acct-panel-${identity.address}`, identity, - selectedAddress: this.props.selectedAddress, + selectedAccount: this.props.selectedAccount, accounts: this.props.accounts, onShowDetail: this.onShowDetail.bind(this), pending, @@ -133,8 +133,8 @@ AccountsScreen.prototype.navigateToConfTx = function () { AccountsScreen.prototype.onSelect = function (address, event) { event.stopPropagation() // if already selected, deselect - if (this.props.selectedAddress === address) address = null - this.props.dispatch(actions.setSelectedAddress(address)) + if (this.props.selectedAccount === address) address = null + this.props.dispatch(actions.setselectedAccount(address)) } AccountsScreen.prototype.onShowDetail = function (address, event) { diff --git a/ui/app/actions.js b/ui/app/actions.js index 51c3d6bec..b4bf2fdde 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -71,7 +71,7 @@ var actions = { TRANSACTION_ERROR: 'TRANSACTION_ERROR', NEXT_TX: 'NEXT_TX', PREVIOUS_TX: 'PREV_TX', - setSelectedAddress: setSelectedAddress, + setselectedAccount: setselectedAccount, signMsg: signMsg, cancelMsg: cancelMsg, sendTx: sendTx, @@ -259,9 +259,9 @@ function showInfoPage () { } } -function setSelectedAddress (address) { +function setselectedAccount (address) { return (dispatch) => { - background.setSelectedAddress(address) + background.setselectedAccount(address) } } @@ -455,7 +455,7 @@ function lockMetamask () { function showAccountDetail (address) { return (dispatch) => { dispatch(actions.showLoadingIndication()) - background.setSelectedAddress(address, (err, address) => { + background.setselectedAccount(address, (err, address) => { dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) diff --git a/ui/app/components/pending-msg-details.js b/ui/app/components/pending-msg-details.js index 16308d121..404cb8ae2 100644 --- a/ui/app/components/pending-msg-details.js +++ b/ui/app/components/pending-msg-details.js @@ -16,7 +16,7 @@ PendingMsgDetails.prototype.render = function () { var msgData = state.txData var msgParams = msgData.msgParams || {} - var address = msgParams.from || state.selectedAddress + var address = msgParams.from || state.selectedAccount var identity = state.identities[address] || { address: address } var account = state.accounts[address] || { address: address } diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index 545302098..42fb4c870 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -24,7 +24,7 @@ PTXP.render = function () { var txData = props.txData var txParams = txData.txParams || {} - var address = txParams.from || props.selectedAddress + var address = txParams.from || props.selectedAccount var identity = props.identities[address] || { address: address } var account = props.accounts[address] var balance = account ? account.balance : '0x0' diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 8d23adfe5..0b1dcac45 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -18,7 +18,7 @@ function mapStateToProps (state) { return { identities: state.metamask.identities, accounts: state.metamask.accounts, - selectedAddress: state.metamask.selectedAddress, + selectedAccount: state.metamask.selectedAccount, unconfTxs: state.metamask.unconfTxs, unconfMsgs: state.metamask.unconfMsgs, index: state.appState.currentView.context, @@ -90,12 +90,12 @@ ConfirmTxScreen.prototype.render = function () { // Properties txData: txData, key: txData.id, - selectedAddress: state.selectedAddress, + selectedAccount: state.selectedAccount, accounts: state.accounts, identities: state.identities, insufficientBalance: this.checkBalnceAgainstTx(txData), // Actions - buyEth: this.buyEth.bind(this, txParams.from || state.selectedAddress), + buyEth: this.buyEth.bind(this, txParams.from || state.selectedAccount), sendTransaction: this.sendTransaction.bind(this, txData), cancelTransaction: this.cancelTransaction.bind(this, txData), signMessage: this.signMessage.bind(this, txData), @@ -120,7 +120,7 @@ ConfirmTxScreen.prototype.checkBalnceAgainstTx = function (txData) { var state = this.props var txParams = txData.txParams || {} - var address = txParams.from || state.selectedAddress + var address = txParams.from || state.selectedAccount var account = state.accounts[address] var balance = account ? account.balance : '0x0' diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index ca450fd89..27d84d8a6 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -285,7 +285,7 @@ function reduceApp (state, action) { warning: null, currentView: { name: 'accountDetail', - context: state.metamask.selectedAddress, + context: state.metamask.selectedAccount, }, accountDetail: { subview: 'transactions', diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 82904dcc6..1a4514a21 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -98,7 +98,6 @@ function reduceMetamask (state, action) { isUnlocked: true, isInitialized: true, selectedAccount: action.value, - selectedAddress: action.value, }) delete newState.seedWords return newState diff --git a/ui/example.js b/ui/example.js index f4126438c..a7e6b80ed 100644 --- a/ui/example.js +++ b/ui/example.js @@ -53,14 +53,14 @@ function addUnconfTx (txParams) { } var isUnlocked = false -var selectedAddress = null +var selectedAccount = null function getState () { return { isUnlocked: isUnlocked, identities: isUnlocked ? identities : {}, unconfTxs: isUnlocked ? unconfTxs : {}, - selectedAddress: selectedAddress, + selectedAccount: selectedAccount, } } @@ -85,8 +85,8 @@ accountManager.submitPassword = function (password, cb) { } } -accountManager.setSelectedAddress = function (address, cb) { - selectedAddress = address +accountManager.setselectedAccount = function (address, cb) { + selectedAccount = address cb(null, getState()) this._didUpdate() } |