From 2306dbd75e0befba488fecdddaccb468145ea985 Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Mon, 26 Aug 2019 06:04:48 -0600 Subject: [PATCH] Fix undefined tx id error (#7053) Also delete unused function --- .../confirm-transaction/confirm-transaction.component.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.component.js b/ui/app/pages/confirm-transaction/confirm-transaction.component.js index c8819dac3..9e7b01baf 100644 --- a/ui/app/pages/confirm-transaction/confirm-transaction.component.js +++ b/ui/app/pages/confirm-transaction/confirm-transaction.component.js @@ -41,11 +41,6 @@ export default class ConfirmTransaction extends Component { isTokenMethodAction: PropTypes.bool, } - getParamsTransactionId () { - const { match: { params: { id } = {} } } = this.props - return id || null - } - componentDidMount () { const { totalUnapprovedCount = 0, @@ -70,7 +65,8 @@ export default class ConfirmTransaction extends Component { if (isTokenMethodAction) { getTokenParams(to) } - this.props.setTransactionToConfirm(transactionId || paramsTransactionId) + const txId = transactionId || paramsTransactionId + if (txId) this.props.setTransactionToConfirm(txId) } componentDidUpdate (prevProps) {