-
Notifications
You must be signed in to change notification settings - Fork 42
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
Discussion: Enhancing the "Swap" lifecycle #1077
Comments
|
@KanziHanzi good question, let me try to address both parts. First, to your specific case: Our docs describe the high-level view of the swap lifecycle:
https://sdk-doc-greenlight.breez.technology/guide/receive_onchain.html This means that, once it's in progress, it can either succeed or become refundable. From your description, it seems you're likely in the second scenario. If so, you can see all refundable swaps with To your second point about tracking the swap through it's lifecycle: The best way to track the progression through different states is by listening for events. For swaps, we emit a Separate from this, |
@alessandro-saglimbeni to your points:
|
In our experience this only happens delayed though. Correct me if I'm wrong but the swap only becomes I think it would be very helpful if you guys could share how you are showcasing a given swap throughout it's lifespan in the app UI (from initiation to LN payment received) |
@KanziHanzi I think it is indeed a gap we need to address. |
@roeierez Yes that sounds good. If that covers all swap statuses from initiation to completion would be very helpful indeed |
Hey @roeierez what's the status on this topic? Did you guys already had a chance to work on the proposed |
As of now the Breez SDK allows us to fetch only currently ongoing swaps. However in the past we experienced an issue with our users where an ongoing swap wasn't returned anymore from the SDK method (considering it as complete) but the associated LN payment to the user’s wallet either hasn’t occurred or has potentially failed. At this stage we are basically clueless as to what happened, eventually a user will be able to claim a refund but in the meanwhile there is just nothing for us to tell them.
To improve the user experience, we want to ensure that our users can always see the status of their swaps. After a swap is fully completed, it would also be beneficial to retain the swap data for display in the wallet history (e.g. via SDK method to get the list of past swaps). This data should include various timestamps throughout the swap’s lifecycle (e.g., swap requested, on-chain transaction confirmed, LN payment sent, LN payment received by the recipient).
Please share your thoughts in this thread.
The text was updated successfully, but these errors were encountered: