-
Notifications
You must be signed in to change notification settings - Fork 292
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
LN payment flow hardening #1892
Comments
@jb55, since the recent To save you a trip to Github, I will list them here so you can stay in your email client lol:
|
Patch sent: https://groups.google.com/a/damus.io/g/patches/c/eT2BINfOH0Q |
@jb55, @alltheseas, I wrote some code to better handle checkout errors (if they occur) I went on each function, each step of the checkout process, and added error handlers with a detailed message.
Here is one example: |
@jb55, don't know if this is the right ticket to send this, but here is a preview of the discount label I just wrote (I did not send this patch yet) |
Figure out which are critical items |
What should expiry invoice duration be? @danieldaquino suggests short invoice, so LN node does not have to keep checking status for invoices. Core LN default is one (1) week. There remains one unsolved checkout/subscription request. |
Moved this to #2021 |
Automatically show welcome sheet for people who completed a Lightning checkout but did not click on the "Continue" button Some people get confused in the last step of the lightning checkout and they do not click on the "Continue in app", which causes the welcome screen to not show up and the translation setting to not be setup. This ticket addresses this issue to ensure they get the welcome screen in such cases. This is how it works: - When they go through the mandatory checkout verification step, the verify screen registers that there is a checkout in progress (and which checkout is in progress) on the DamusPurple struct - Every time the app enters the foreground, it checks for that flag: - If there are no checkouts in progress, it does nothing - If there is one or multiple checkouts in progress, it checks the checkout status for those. If any checkout is freshly completed and successful, and the account is now active, it shows the welcome screen and onboarding - Once the welcome screen is shown, those checkouts are marked internally as handled (so that we only show it once) =========== Testing =========== PASS Damus: This commit Device: iPhone 13 Mini (real physical device) iOS: 17.3.1 damus-api: 044150fedddc5ba4135a80579e41e9c1c5743fc0 damus-website: af8089128159e25df31141be624b4090c66d6ddf Setup: - Local test Setup - Clean db before starting PART 1: LN flow without clicking on the link --------------------------------------------- Steps: 1. Go through the normal LN flow, EXCEPT at the last step. On the last step, instead of clicking "continue in the app", just switch to the app. 2. Ensure the welcome screen and onboarding shows up, and the purple screen updates to show account info. PASS 3. Switch out and into the app again. Welcome screen should NOT show up again. PASS 4. Close the app completely and open the app again. Purple welcome screen should NOT show up again. PASS PART 2: Normal LN flow --------------------------------------------- Steps: 1. Reset the entire test setup 2. Go through the normal LN flow (this time click on "continue in app"). The welcome screen should show up without issues or glitches. PASS PART 3: Crazy flow with multiple incomplete checkouts --------------------------------------------- (This is to simulate a confused user who accidentally opens multiple new checkouts, but in the end only completes one of them) Steps: 1. Reset the entire test setup 2. Open 5 LN checkouts and verify npub with all of them. 3. Only pay one of those checkouts (to make it more confusing, don't pay the first or last one, but a random one in between) 4. Go to the app directly (Do not use the link, just go directly to the app) Related: #1892 Changelog-Fixed: Fix welcome screen not showing if the user enters the app directly after a successful checkout without going through the link Closes: #2021 Signed-off-by: Daniel D’Aquino <[email protected]> Link: [email protected] Signed-off-by: William Casarin <[email protected]>
This is a placeholder task for further improvements/hardening of the LN payment flow.
Continuation of #1754 and #1827
Acceptance criteria
damus-api
that covers the LN flow as well as edge casesdamus:purple
linksOn iOS, make "Verify Npub" screen raise a session flag indicating that a checkout is in progress, and detect if account was created when app enters foreground, to show welcome sheet right awayMoved to Handle LN checkout cases where user does not click on "continue on app" in the last step #2021Note: This ticket is generic, it can be split into more tickets if convenient.
The text was updated successfully, but these errors were encountered: