diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2019-03-30 02:27:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-30 02:27:16 +0800 |
commit | 87f393eb31c5172a246db6be37331f8bed9d096e (patch) | |
tree | f0f06ea848f02c0137b3d9774b7cae4a3c9cd982 /ui/app | |
parent | adcf03eacc4ec5b6dc0e753ce81b2df6071e1f75 (diff) | |
parent | 57bcf1449cccbe5f0fe81ebe475da7a25b29c18b (diff) | |
download | tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.tar tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.tar.gz tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.tar.bz2 tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.tar.lz tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.tar.xz tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.tar.zst tangerine-wallet-browser-87f393eb31c5172a246db6be37331f8bed9d096e.zip |
Merge pull request #6375 from MetaMask/Version-6.3.1v6.3.1
Version 6.3.1
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js | 4 | ||||
-rw-r--r-- | ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js index cd471b822..25f2402f1 100644 --- a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js +++ b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js @@ -25,6 +25,7 @@ export default class ConfirmTransactionSwitch extends Component { methodData: PropTypes.object, fetchingData: PropTypes.bool, isEtherTransaction: PropTypes.bool, + isTokenMethod: PropTypes.bool, } redirectToTransaction () { @@ -33,6 +34,7 @@ export default class ConfirmTransactionSwitch extends Component { methodData: { name }, fetchingData, isEtherTransaction, + isTokenMethod, } = this.props const { id, txParams: { data } = {} } = txData @@ -45,7 +47,7 @@ export default class ConfirmTransactionSwitch extends Component { return <Redirect to={{ pathname }} /> } - if (isEtherTransaction) { + if (isEtherTransaction && !isTokenMethod) { const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SEND_ETHER_PATH}` return <Redirect to={{ pathname }} /> } diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js index 7f2c36af2..8213f0964 100644 --- a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js +++ b/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js @@ -1,5 +1,10 @@ import { connect } from 'react-redux' import ConfirmTransactionSwitch from './confirm-transaction-switch.component' +import { + TOKEN_METHOD_TRANSFER, + TOKEN_METHOD_APPROVE, + TOKEN_METHOD_TRANSFER_FROM, +} from '../../helpers/constants/transactions' const mapStateToProps = state => { const { @@ -16,6 +21,7 @@ const mapStateToProps = state => { methodData, fetchingData, isEtherTransaction: !toSmartContract, + isTokenMethod: [TOKEN_METHOD_APPROVE, TOKEN_METHOD_TRANSFER, TOKEN_METHOD_TRANSFER_FROM].includes(methodData.name && methodData.name.toLowerCase()), } } |