Paying unpaid eSIM orders, scanned amounts and send fixes
TLDR
0 PRs merged, 1 commit across all branches, 4 PRs opened, 2 PRs reviewed, 1 repo (the Nuri app), 2 deployments, +55 / -2 lines. 1 feature worked on. The main thing is that an unpaid eSIM order can be paid from its own row instead of ordering again. The other three PRs fix sends that failed or looked broken without telling the user why, and none of the four is merged yet.
Paying an unpaid eSIM order
In the app, an eSIM order that was created but never paid only showed “Waiting for payment” and the row wasn’t tappable. So the only way out was to order again, which creates a second invoice while the first one sits there until it expires. I opened an issue for it and a PR the same day.
With the PR the row shows “Pay now” and opens that order’s own invoice in the send sheet. It only does that if this wallet never started a Lightning send for that invoice, the order isn’t marked paid, the invoice has more than 5 minutes left and the stored invoice still matches the order. The first rule matters most, because paying the same invoice twice locks sats nobody can claim. If the app can’t tell whether a send was started, it treats it as started, and it checks again when you tap.
I tested it on an iPhone SE in Safari with a real unpaid order. The row showed “Jetzt bezahlen” and tapping it handed the 2229 sat invoice to the send sheet. With a send already recorded, the row showed “Wartet auf Zahlung” and tapping did nothing. Unit tests, lint and typecheck pass. The PR is not merged yet.
Scanned stablecoin amounts
When you scanned a payment QR for USDC or EURC with an amount higher than your balance, the app cleared the amount field. You saw an empty field and a disabled Send button with no reason. The same happened while the balance was still loading and showed 0.
With the PR the scanned amount always stays in the field. If it’s above the balance, Send stays disabled and the “Exceeds available balance” hint shows. The check uses the exact scanned amount, so 1.004 scanned against 1.00 held is caught too, which the 2 decimal display missed. A balance refresh also no longer resets the recipient or an amount you edited. The new tests pass, and the full run has 2 failures in an unrelated web payment test because of missing packages. Not merged yet.
Sending on Base with an empty gas wallet
To send tokens on Base, the app tops up a little ETH for fees. If that top-up didn’t happen and the wallet still had exactly 0 ETH, the send went ahead anyway and failed with a raw “gas required exceeds allowance (0)” error, which came up 3 times. With the PR an empty wallet stops before that and gets the app’s own “gas top-up unavailable” error. A wallet with some ETH below the safe minimum still tries the real send, same as before. When the server says the wallet already has gas, the app now waits briefly for the balance to show up instead of refusing. Not merged yet.
LNURL errors
When a Lightning payment request got refused by the receiving server, the app only logged “LNURL HTTP 400”. With the PR it reads the reason the server sends back, for example that the amount is out of bounds with its min and max, and puts it into the log and the support report. The send screen keeps its generic text, because raw provider errors don’t go in front of users. There are 5 new tests, 2 of them fail on the old code and all 5 pass with the fix. Not merged yet.
Reviews
I reviewed the fix for scanned stablecoin payments that opened without recipient or amount, and merged it into the branch I’m working on for another send bug, which is my one commit today. I also reviewed a PR that keeps the welcome screen buttons above the system navigation bar.