Skip to content

Commit 5ad85c5

Browse files
fix: second class chains dedupe internal/value (#11527)
1 parent bfcc0df commit 5ad85c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/chain-adapters/src/evm/SecondClassEvmAdapter.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,14 @@ export abstract class SecondClassEvmAdapter<T extends EvmChainId> extends EvmBas
500500
const internalFrom = getAddress(internalTx.from)
501501
const internalTo = getAddress(internalTx.to)
502502

503+
// Skip internal transactions that duplicate the native transaction
504+
if (
505+
isAddressEqual(internalFrom, txFrom) &&
506+
isAddressEqual(internalTo, txTo) &&
507+
internalTx.value === tx.value
508+
)
509+
continue
510+
503511
if (isAddressEqual(address, internalFrom)) {
504512
nativeTransfers.push({
505513
assetId: this.assetId,

0 commit comments

Comments
 (0)