Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btc: wallet history classifies Swap transaction type incorrectly #3137

Closed
norwnd opened this issue Jan 6, 2025 · 3 comments · Fixed by #3142
Closed

btc: wallet history classifies Swap transaction type incorrectly #3137

norwnd opened this issue Jan 6, 2025 · 3 comments · Fixed by #3142

Comments

@norwnd
Copy link
Contributor

norwnd commented Jan 6, 2025

I've noticed Bitcoin SPV wallet history has a bug:

image

namely it seems to be classifying Swap as Refund, while not showing the actual Refund transaction that is currently in mempool - you can see on screenshot above:

  1. I received funds and then
  2. there is a Refund without any prior Swap (there is Acceleration transaction I've issued after swap has been stuck for some time, and that's what got Swap transaction mined couple of hours later - but at that point Match was revoked and it switched to refunding flow as it should)

Match-card page shows all 3 transactions (Swap tx, separate Acceleration tx, pending Refund tx) correctly.

After browsing through the relevant code I'm thinking this adjustment should resolve the issue (it relaxes the requirement on Swap/Send transactions to have tx.Send == true and looks like this is how it's done for zcash as well)

@JoeGruffins
Copy link
Member

I can confirm this behavior on simnet, just accelerating a swap and forcing it to refund, I end up with two refunds in the transaction history

image

@JoeGruffins
Copy link
Member

JoeGruffins commented Jan 14, 2025

I don't think this change is correct from testing.

The history is actually fine if restoring from seed. Something else is off.

@JoeGruffins
Copy link
Member

It doesn't need to be accelerated, any refund is replacing the swap with a refund on master.

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 a pull request may close this issue.

3 participants
@JoeGruffins @norwnd and others