aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/pages/send/send.selectors.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/pages/send/send.selectors.js')
-rw-r--r--ui/app/pages/send/send.selectors.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/ui/app/pages/send/send.selectors.js b/ui/app/pages/send/send.selectors.js
index d4035df28..ed2917020 100644
--- a/ui/app/pages/send/send.selectors.js
+++ b/ui/app/pages/send/send.selectors.js
@@ -6,6 +6,7 @@ const {
const {
getMetaMaskAccounts,
getSelectedAddress,
+ getAddressBook,
} = require('../../selectors/selectors')
const {
estimateGasPriceFromRecentBlocks,
@@ -17,7 +18,6 @@ import {
const selectors = {
accountsWithSendEtherInfoSelector,
- getAddressBook,
getAmountConversionRate,
getBlockGasLimit,
getConversionRate,
@@ -43,6 +43,8 @@ const selectors = {
getSendHexData,
getSendHexDataFeatureFlagState,
getSendEditingTransactionId,
+ getSendEnsResolution,
+ getSendEnsResolutionError,
getSendErrors,
getSendFrom,
getSendFromBalance,
@@ -50,6 +52,7 @@ const selectors = {
getSendMaxModeState,
getSendTo,
getSendToAccounts,
+ getSendToNickname,
getSendWarnings,
getTokenBalance,
getTokenExchangeRate,
@@ -63,7 +66,6 @@ module.exports = selectors
function accountsWithSendEtherInfoSelector (state) {
const accounts = getMetaMaskAccounts(state)
const { identities } = state.metamask
-
const accountsWithSendEtherInfo = Object.entries(accounts).map(([key, account]) => {
return Object.assign({}, account, identities[key])
})
@@ -71,10 +73,6 @@ function accountsWithSendEtherInfoSelector (state) {
return accountsWithSendEtherInfo
}
-function getAddressBook (state) {
- return state.metamask.addressBook
-}
-
function getAmountConversionRate (state) {
return getSelectedToken(state)
? getSelectedTokenToFiatRate(state)
@@ -237,6 +235,10 @@ function getSendTo (state) {
return state.metamask.send.to
}
+function getSendToNickname (state) {
+ return state.metamask.send.toNickname
+}
+
function getSendToAccounts (state) {
const fromAccounts = accountsWithSendEtherInfoSelector(state)
const addressBookAccounts = getAddressBook(state)
@@ -251,6 +253,14 @@ function getTokenBalance (state) {
return state.metamask.send.tokenBalance
}
+function getSendEnsResolution (state) {
+ return state.metamask.send.ensResolution
+}
+
+function getSendEnsResolutionError (state) {
+ return state.metamask.send.ensResolutionError
+}
+
function getTokenExchangeRate (state, tokenSymbol) {
const pair = `${tokenSymbol.toLowerCase()}_eth`
const tokenExchangeRates = state.metamask.tokenExchangeRates