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
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
4330a18 to
22ffdb3
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.
| > = props => { | ||
| const { route } = props | ||
| const { quoteId } = route.params | ||
| const theme = useTheme() |
There was a problem hiding this comment.
GiftCardAccountInfoScene crashes without route params
High Severity
GiftCardAccountInfoScene destructures route.params directly, but navigation from SettingsScene calls navigation.navigate('giftCardAccountInfo', {}), and route.params can be undefined depending on navigation behavior. This can throw at render time, blocking the scene from opening.
Additional Locations (1)
There was a problem hiding this comment.
Fixed: Guarded access to route.params by using optional chaining for so the scene no longer throws when params are undefined.
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.
22ffdb3 to
115db6e
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 gift card purchasing, order polling, and transaction metadata; mistakes could cause incorrect payment amounts/fees or confusing order states, though changes are localized to the gift-card feature set.
Overview
Improves the Phaze gift card experience by adding a new “Gift Card Account Information” scene (reachable from developer settings and from a failed card’s menu) that reveals/copies provider identity info behind a confirmation wall, with quote-id context.
Refactors gift card order fetching to TanStack Query with focus-gated polling, adds clearer network vs service error messaging/banners, and expands card state handling to include
confirmingandfailed(including a “Get Help” CTA for failed cards).Hardens the purchase/send flow by forcing high-priority network fees and locking the fee tile, padding the payment quantity to avoid underpayment, validating presence of a payment address, retrying token fetch on demand, and saving richer transaction action metadata (
quoteId,orderId,productId) with updated transaction details UI including quote-id display and one-tap copy of all details.Written by Cursor Bugbot for commit 115db6e. This will update automatically on new commits. Configure here.