diff options
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, } } |