Skip to content

[BCN] fix duplicate native EVM receive history rows#4181

Open
msalcala11 wants to merge 1 commit into
bitpay:masterfrom
msalcala11:fix-dup-evm-history
Open

[BCN] fix duplicate native EVM receive history rows#4181
msalcala11 wants to merge 1 commit into
bitpay:masterfrom
msalcala11:fix-dup-evm-history

Conversation

@msalcala11
Copy link
Copy Markdown
Contributor

Description

Fixes duplicate native EVM receive history rows.

For some transactions, the EVM trace includes a top-level call at call stack 0 that moves the chain's native coin, like MATIC or ETH. Bitcore turns that trace call into an effect. In this case, the effect is not a separate internal transfer; it is just another representation of the transaction's own from, to, and value.

Before this change, wallet history treated that root effect as an extra receive and also emitted the original transaction receive, which doubled the amount shown for that transaction.

Changelog

  • Ignore root native-transfer effects that exactly match the original EVM transaction.
  • Keep genuine internal receives; only skip the root trace effect when it duplicates the original transaction transfer.
  • Add a MATIC wallet history integration regression for the duplicate receive case.

Testing Notes

npm run test:integration


Checklist

  • I have read CONTRIBUTING.md and verified that this PR follows the guidelines and requirements outlined in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant