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

fix: Don't show swaps as 'refundable' when there was no lockup tx #811

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

kiocosta
Copy link
Contributor

@kiocosta kiocosta commented Feb 2, 2025

Closes #806

I have tested this by creating a few swaps and:

  • letting them expire without paying (these were not displayed);
  • paying them after they've expired (these were displayed);
  • paying an incorrect amount (these were displayed);

Copy link

vercel bot commented Feb 2, 2025

@kiocosta is attempting to deploy a commit to the boltz Team on Vercel.

A member of the Team first needs to authorize it.

@kiocosta kiocosta force-pushed the show-lockup-txs-only branch 3 times, most recently from ff38c44 to 8618332 Compare February 3, 2025 02:23
Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webapp ✅ Ready (Inspect) Visit Preview Feb 4, 2025 11:03pm
webapp-mainnet ✅ Ready (Inspect) Visit Preview Feb 4, 2025 11:03pm

Copy link
Member

@kilrau kilrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review, many of us are travelling. tACK from my side (no code review)

I tested the following 4 scenarios:

  1. paying correctly and letting a swap fail (e.g.invoice.failedToPay): displayed ✅
  2. paying an incorrect amount: displayed ✅
  3. letting a swap expire without paying: not displayed ✅
  4. With "paying them after they've expired (these were displayed);" you made it sound like you are already did Refund: use 3rd party blockexplorer endpoints to double check if a lockup address has funds #809 but that's not the case. All good, let's handle Refund: use 3rd party blockexplorer endpoints to double check if a lockup address has funds #809 separately. ✅

Comment on lines 35 to 37
[swapStatusFailed.TransactionLockupFailed].includes(
swap.status,
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[swapStatusFailed.TransactionLockupFailed].includes(
swap.status,
),
swapStatusFailed.TransactionLockupFailed === swap.status,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael1011 done!

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.

Don't show swaps as "refundable" in /refund when there was no lockup tx
3 participants