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

Remembers invoice #521

Merged
merged 5 commits into from
Jan 3, 2024
Merged

Remembers invoice #521

merged 5 commits into from
Jan 3, 2024

Conversation

bordalix
Copy link
Contributor

@bordalix bordalix commented Jan 3, 2024

This PR makes Marina remember previous invoices and don't ask for a submarine swap again.

Implements a new updater strategy for refundable tx (tx from failed swaps):

  • these swaps can be in 2 different scenarios:
    • they were broadcasted (ie, have a txid)
      • remove them if they were swepts by Boltz (not refundable anymore because were spent)
    • user didn't went through and didn't broadcasted the tx
      • kept in cache cause we can't ask Boltz for another swap with the same invoice, so we will use this values if that happens
      • after invoice expiration date these swaps are removed from storage

Fixes bugs on tx list:

  • Wrong 0
  • Refund button was available on tx not confirmed

@tiero please review

@tiero
Copy link
Member

tiero commented Jan 3, 2024

tACK re-using invoice like @altafan reported

didn't tested let invoice expiring, but should be safe if it happens

@tiero tiero merged commit 54259aa into vulpemventures:master Jan 3, 2024
6 checks passed
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.

2 participants