diff options
Diffstat (limited to 'ui/app/ducks/confirm-transaction/confirm-transaction.duck.js')
-rw-r--r-- | ui/app/ducks/confirm-transaction/confirm-transaction.duck.js | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js index 58b0ec8e8..b8d1a7e81 100644 --- a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js +++ b/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js @@ -1,4 +1,3 @@ -import log from 'loglevel' import { conversionRateSelector, currentCurrencySelector, @@ -18,12 +17,9 @@ import { import { getTokenData, - getMethodData, - isSmartContractAddress, sumHexes, } from '../../helpers/utils/transactions.util' -import { getSymbolAndDecimals } from '../../helpers/utils/token-util' import { conversionUtil } from '../../helpers/utils/conversion-util' import { addHexPrefix } from 'ethereumjs-util' @@ -348,7 +344,7 @@ export function updateTxDataAndCalculate (txData) { } export function setTransactionToConfirm (transactionId) { - return async (dispatch, getState) => { + return (dispatch, getState) => { const state = getState() const unconfirmedTransactionsHash = unconfirmedTransactionsHashSelector(state) const transaction = unconfirmedTransactionsHash[transactionId] @@ -364,34 +360,14 @@ export function setTransactionToConfirm (transactionId) { dispatch(updateTxDataAndCalculate(txData)) const { txParams } = transaction - const { to } = txParams if (txParams.data) { - const { tokens: existingTokens } = state - const { data, to: tokenAddress } = txParams - - dispatch(setFetchingData(true)) - const methodData = await getMethodData(data) - dispatch(updateMethodData(methodData)) + const { data } = txParams - try { - const toSmartContract = await isSmartContractAddress(to || '') - dispatch(updateToSmartContract(toSmartContract)) - } catch (error) { - log.error(error) - } - dispatch(setFetchingData(false)) const tokenData = getTokenData(data) dispatch(updateTokenData(tokenData)) - try { - const tokenSymbolData = await getSymbolAndDecimals(tokenAddress, existingTokens) || {} - const { symbol: tokenSymbol = '', decimals: tokenDecimals = '' } = tokenSymbolData - dispatch(updateTokenProps({ tokenSymbol, tokenDecimals })) - } catch (error) { - dispatch(updateTokenProps({ tokenSymbol: '', tokenDecimals: '' })) - } } if (txParams.nonce) { |