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) {