diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-07-07 02:58:41 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-07-07 07:27:08 +0800 |
commit | a2d9c43fba49680d7553409a4f5013d3febd80e9 (patch) | |
tree | 56417ef3c675774173da49d3edfb951a3310fd5e /ui/app/components/pages/confirm-transaction-switch | |
parent | 9cde5ab11b0670eed7baeb2f31486cb3e253bdcb (diff) | |
download | tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.tar tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.tar.gz tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.tar.bz2 tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.tar.lz tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.tar.xz tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.tar.zst tangerine-wallet-browser-a2d9c43fba49680d7553409a4f5013d3febd80e9.zip |
Various fixes from PR comments
Diffstat (limited to 'ui/app/components/pages/confirm-transaction-switch')
2 files changed, 18 insertions, 9 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 db28d0bad..25259b98c 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 @@ -16,19 +16,20 @@ import { TOKEN_METHOD_TRANSFER, TOKEN_METHOD_APPROVE } from './confirm-transacti export default class ConfirmTransactionSwitch extends Component { static propTypes = { - confirmTransaction: PropTypes.object, + txData: PropTypes.object, + methodData: PropTypes.object, + fetchingMethodData: PropTypes.bool, } redirectToTransaction () { const { - confirmTransaction: { - txData, - methodData: { name }, - fetchingMethodData, - }, + txData, + methodData: { name }, + fetchingMethodData, } = this.props const { id } = txData + if (isConfirmDeployContract(txData)) { const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_DEPLOY_CONTRACT_PATH}` return <Redirect to={{ pathname }} /> @@ -62,7 +63,7 @@ export default class ConfirmTransactionSwitch extends Component { } render () { - const { confirmTransaction: { txData } } = this.props + const { txData } = this.props if (txData.txParams) { return this.redirectToTransaction() 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 c04d388a9..3d7fc78cc 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 @@ -2,10 +2,18 @@ import { connect } from 'react-redux' import ConfirmTransactionSwitch from './confirm-transaction-switch.component' const mapStateToProps = state => { - const { confirmTransaction } = state + const { + confirmTransaction: { + txData, + methodData, + fetchingMethodData, + }, + } = state return { - confirmTransaction, + txData, + methodData, + fetchingMethodData, } } |