Skip to content

Remembers invoice#521

Merged
tiero merged 5 commits into
vulpemventures:masterfrom
bordalix:persist_swap
Jan 3, 2024
Merged

Remembers invoice#521
tiero merged 5 commits into
vulpemventures:masterfrom
bordalix:persist_swap

Conversation

@bordalix

@bordalix bordalix commented Jan 3, 2024

Copy link
Copy Markdown
Contributor

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

tiero commented Jan 3, 2024

Copy link
Copy Markdown
Member

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
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