diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-08-23 05:48:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 05:48:37 +0800 |
commit | 25eac2334b96b8b2af6b8859631d8a032bfdd2bb (patch) | |
tree | 8205c57d55c2182e21b4dc87ec907b86343e374a /ui/app/components/pages | |
parent | 619ab3838ba5d34d61fa71204d1d59514299b80c (diff) | |
parent | 865a0d8173e27c073f00d0d156b95e8d92208a94 (diff) | |
download | tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.tar tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.tar.gz tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.tar.bz2 tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.tar.lz tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.tar.xz tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.tar.zst tangerine-wallet-browser-25eac2334b96b8b2af6b8859631d8a032bfdd2bb.zip |
Merge pull request #5089 from MetaMask/i5085-ethcode
Use eth_getCode to sort transaction action type
Diffstat (limited to 'ui/app/components/pages')
2 files changed, 14 insertions, 5 deletions
diff --git a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js index 0280f73c6..d494977cd 100644 --- a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js +++ b/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.component.js @@ -23,14 +23,16 @@ export default class ConfirmTransactionSwitch extends Component { static propTypes = { txData: PropTypes.object, methodData: PropTypes.object, - fetchingMethodData: PropTypes.bool, + fetchingData: PropTypes.bool, + isEtherTransaction: PropTypes.bool, } redirectToTransaction () { const { txData, methodData: { name }, - fetchingMethodData, + fetchingData, + isEtherTransaction, } = this.props const { id, txParams: { data } = {} } = txData @@ -39,10 +41,15 @@ export default class ConfirmTransactionSwitch extends Component { return <Redirect to={{ pathname }} /> } - if (fetchingMethodData) { + if (fetchingData) { return <Loading /> } + if (isEtherTransaction) { + const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SEND_ETHER_PATH}` + return <Redirect to={{ pathname }} /> + } + if (data) { const methodName = name && name.toLowerCase() diff --git a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.container.js b/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.container.js index 3d7fc78cc..7f2c36af2 100644 --- a/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.container.js +++ b/ui/app/components/pages/confirm-transaction-switch/confirm-transaction-switch.container.js @@ -6,14 +6,16 @@ const mapStateToProps = state => { confirmTransaction: { txData, methodData, - fetchingMethodData, + fetchingData, + toSmartContract, }, } = state return { txData, methodData, - fetchingMethodData, + fetchingData, + isEtherTransaction: !toSmartContract, } } |