Conversation
swansontec
left a comment
There was a problem hiding this comment.
I can't actually approve / reject the PR, since I opened it, but here are my comments. Also check the AI comments.
|
Both issues addressed: cart[0] null check added, offline cold start now sets loadError. |
e831555 to
0fdd593
Compare
|
Note the additional commit. After discussing with Phaze, the only remaining issue causing failed purchases is intermittent underpayments by 0.00000001 (chain-agnostic - they always quote in exchange amounts). After extensive inspection, there doesn't appear to be a way we could be underpaying on our side, yet they strongly claim that there is no drift in their quoted amount vs validated amount. Padding by 0.00000002 and crossing fingers. |
0fdd593 to
90fd9b7
Compare
|
Fixed: Removed the dead catch block since TanStack Query's refetch() always resolves. Added a comment explaining this behavior. |
90fd9b7 to
050c626
Compare
4fe1ee3 to
3f7d7da
Compare
3f7d7da to
158b3a0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
158b3a0 to
c364b35
Compare
|
Fixed: Separated brands fetch into its own This addresses the "Brands API called on every 10-second poll cycle" feedback. |
c364b35 to
a2e23be
Compare
Add asTolerantArray helper that skips malformed items instead of throwing on the entire array. Apply it to brand lists and voucher arrays so a single bad entry doesn't break the whole UI. Also add 'failed' to recognized order statuses and make deliveryAddress optional with an empty-string default.
Expose isError/error from useGiftCardProvider so scenes can detect provider initialization failures. On GiftCardListScene, stop clearing orders on API errors (keep last-known-good data visible), pause polling when offline and auto-resume on reconnect, and show an informational warning banner that auto-clears on success. On GiftCardMarketScene, gate the brand query on network connectivity so it auto-retries when online, and show a warning instead of an infinite loader when the initial fetch fails. On GiftCardPurchaseScene, guard against empty delivery addresses and show a warning when the provider fails to initialize.
Add isCreatingOrder to the early-return guard in handleNextPress so a second tap during the brief window before React disables the button cannot trigger duplicate order creation.
Distinguish between awaiting blockchain confirmations (txid exists but no voucher yet), pending voucher delivery, and failed/expired orders. Failed cards are dimmed like redeemed cards.
Display the Phaze quoteId at the top of the kebab menu modal for easier debugging and support reference.
Extend the gift card tx details card with a Quote ID row and a single copy button on the right side that copies all data at once. Dividers stop short of the copy button. The redeem row remains separate with its own chevron. Document backward-compat: orderId stores quoteId in prior versions.
New scene to view Phaze account credentials behind a confirmation wall. Shows quoteId context when accessed from a specific card. After the user confirms a ConfirmContinueModal warning about redemption risk, identity data (email, user ID) is revealed with copy buttons.
Add a 'Get Help' row to the gift card kebab menu that navigates to the new Gift Card Account Information scene with the quoteId. Also surface a 'Get Help' button on failed cards, reusing the existing redeem button pattern.
Add a Gift Card Account Info row in the developer mode section of SettingsScene that navigates to the new account information scene.
Set networkFeeOption to high and lock the fee tile so users cannot lower the fee priority. Gift card orders are time-sensitive with expiring quotes, so high priority reduces the risk of missed deadlines.
Populate quoteId, productId, and orderId correctly in the saved action now that the core type has explicit fields. Update GiftCardDetailsCard with backward-compat detection: if quoteId is absent, treat orderId as the quoteId per legacy behavior.
c364b35 to
4330a18
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Medium Risk
Touches the gift card purchase and send navigation path (fee locking, payment amount padding, tx metadata), which can affect payments if incorrect. Most changes are UX/error handling and parsing hardening, reducing crash risk but requiring end-to-end testing against the Phaze API.
Overview
Adds a new
giftCardAccountInfoscene (reachable from failed cards and developer settings) that gates and reveals Phaze identity info and allows copying it for support, and updates the gift card menu/modal and list cards with a Get Help path.Reworks gift card list polling/caching to use TanStack Query (focus-gated polling, per-account caching), adds distinct
confirming/failedstates with shimmer/dimming behavior, and improves UX by distinguishing network vs service failures and disabling purchase when offline/error.Hardens purchase flow by locking send fees to
high, padding payment quantity to avoid underpayment, validating payment address/cart items, persisting richer tx metadata (quoteId+orderId+productId), and updating transaction details to display/copy the new fields with backward compatibility.Makes Phaze API parsing more tolerant (healing array cleaners, optional
deliveryAddress, addsfailedstatus) and surfaces provider errors viauseGiftCardProviderfor UI warnings.Written by Cursor Bugbot for commit 4330a18. This will update automatically on new commits. Configure here.