diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-08-18 05:34:14 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-08-23 05:19:07 +0800 |
commit | 865a0d8173e27c073f00d0d156b95e8d92208a94 (patch) | |
tree | 0bb56f82deb2ede6a0d10de4e3e1454b63b691e9 /ui/app/components | |
parent | f30b726df79f1ffe0ba088dba9f3ca730ee7d103 (diff) | |
download | tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.gz tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.bz2 tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.lz tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.xz tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.zst tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.zip |
Use eth_getCode to sort transaction action type
Diffstat (limited to 'ui/app/components')
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, } } |