Skip to content

Commit

Permalink
Fix transaction cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
everdimension committed Dec 26, 2024
1 parent e7a320e commit 1d0f502
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/ethereum/transactions/describeTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ function sliceArguments(data: string) {
}

function matchSelectors(transaction: IncomingTransaction, selectors: string[]) {
if (!transaction.data || !transaction.to) {
const { data } = transaction;
if (!transaction.to || data == null || ethers.toQuantity(data) === '0x0') {
return null;
}
const selector = sliceSelector(transaction.data);
const selector = sliceSelector(data);
if (!selectors.some((s) => s === selector)) {
return null;
}
const args = sliceArguments(transaction.data);
const args = sliceArguments(data);
return {
selector,
args,
Expand Down

0 comments on commit 1d0f502

Please sign in to comment.