From 358dacb0f5d5b35611cd3412cf4ff39a80bf442a Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 14 Nov 2022 23:53:03 -0330 Subject: [PATCH] Code cleanup --- .../confirm-transaction-base.component.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index 37cdf2667c7b..29755bbd655d 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -1157,14 +1157,12 @@ export default class ConfirmTransactionBase extends Component { requestsWaitingText, } = this.getNavigateTxData(); - let functionType; - let isContractInteractionFromDapp = false; - if ( + const isContractInteractionFromDapp = txData.type === TRANSACTION_TYPES.CONTRACT_INTERACTION && - txData.origin !== 'metamask' - ) { + txData.origin !== 'metamask'; + let functionType; + if (isContractInteractionFromDapp) { functionType = getMethodName(name); - isContractInteractionFromDapp = true; } if (!functionType) {