diff options
Diffstat (limited to 'ui/app/components/send')
-rw-r--r-- | ui/app/components/send/send.selectors.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/app/components/send/send.selectors.js b/ui/app/components/send/send.selectors.js index eb22a08b7..c217d848e 100644 --- a/ui/app/components/send/send.selectors.js +++ b/ui/app/components/send/send.selectors.js @@ -4,6 +4,9 @@ const { multiplyCurrencies, } = require('../../conversion-util') const { + getMetaMaskAccounts, +} = require('../../selectors') +const { estimateGasPriceFromRecentBlocks, } = require('./send.utils') @@ -54,10 +57,8 @@ const selectors = { module.exports = selectors function accountsWithSendEtherInfoSelector (state) { - const { - accounts, - identities, - } = state.metamask + const accounts = getMetaMaskAccounts(state) + const { identities } = state.metamask const accountsWithSendEtherInfo = Object.entries(accounts).map(([key, account]) => { return Object.assign({}, account, identities[key]) @@ -72,7 +73,7 @@ function accountsWithSendEtherInfoSelector (state) { // const autoAddTokensThreshold = 1 // const numberOfTransactions = state.metamask.selectedAddressTxList.length -// const numberOfAccounts = Object.keys(state.metamask.accounts).length +// const numberOfAccounts = Object.keys(getMetaMaskAccounts(state)).length // const numberOfTokensAdded = state.metamask.tokens.length // const userPassesThreshold = (numberOfTransactions > autoAddTransactionThreshold) && @@ -155,14 +156,14 @@ function getRecentBlocks (state) { } function getSelectedAccount (state) { - const accounts = state.metamask.accounts + const accounts = getMetaMaskAccounts(state) const selectedAddress = getSelectedAddress(state) return accounts[selectedAddress] } function getSelectedAddress (state) { - const selectedAddress = state.metamask.selectedAddress || Object.keys(state.metamask.accounts)[0] + const selectedAddress = state.metamask.selectedAddress || Object.keys(getMetaMaskAccounts(state))[0] return selectedAddress } |