Skip to content

refactor verifyIfValidTxn to include more checks that is done outside of this function #947

@kevzzsk

Description

@kevzzsk

What would you like to be added:

Refactor evmTransactionConfirmerService.verifyIfValidTxn function to include 65 confirmations:

// Check if 65 confirmations is completed in evm
      if (numberOfConfirmations < this.MIN_REQUIRED_EVM_CONFIRMATION) {
        throw new Error(
          'Transaction has not been processed, did not complete 65 confirmations for EVM unable to proceed with refund request',
        );
      }

and Check if txn is created from our contract

// Check if txn is created from our contract
      if (!isValidTxn || txReceipt.to !== this.contractAddress) {
        throw new Error('Invalid transaction hash');
      }

Why is this needed:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions