Skip to content

Comments

Jon/fix/phaze 3.1#5943

Merged
j0ntz merged 12 commits intodevelopfrom
jon/fix/phaze-3.1
Feb 23, 2026
Merged

Jon/fix/phaze 3.1#5943
j0ntz merged 12 commits intodevelopfrom
jon/fix/phaze-3.1

Conversation

@swansontec
Copy link
Contributor

@swansontec swansontec commented Feb 17, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

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 confirming and failed (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.


Copy link
Contributor Author

@swansontec swansontec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't actually approve / reject the PR, since I opened it, but here are my comments. Also check the AI comments.

@j0ntz
Copy link
Contributor

j0ntz commented Feb 20, 2026

Both issues addressed: cart[0] null check added, offline cold start now sets loadError.

@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from e831555 to 0fdd593 Compare February 20, 2026 01:11
@j0ntz
Copy link
Contributor

j0ntz commented Feb 20, 2026

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.

@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from 0fdd593 to 90fd9b7 Compare February 20, 2026 01:57
@j0ntz
Copy link
Contributor

j0ntz commented Feb 20, 2026

Fixed: Removed the dead catch block since TanStack Query's refetch() always resolves. Added a comment explaining this behavior.

@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from 90fd9b7 to 050c626 Compare February 20, 2026 02:40
@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch 3 times, most recently from 4fe1ee3 to 3f7d7da Compare February 20, 2026 20:37
@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from 3f7d7da to 158b3a0 Compare February 20, 2026 20:57
@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from 158b3a0 to c364b35 Compare February 21, 2026 00:29
@j0ntz
Copy link
Contributor

j0ntz commented Feb 21, 2026

Fixed: Separated brands fetch into its own useQuery with staleTime: Infinity so it's fetched once per session. Removed getMarketBrands from the orders polling query.

This addresses the "Brands API called on every 10-second poll cycle" feedback.

Copy link
Contributor

@j0ntz j0ntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

William approved

@j0ntz j0ntz enabled auto-merge February 21, 2026 01:16
@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from c364b35 to a2e23be Compare February 21, 2026 01:27
@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch 3 times, most recently from 4330a18 to 22ffdb3 Compare February 23, 2026 19:53
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@j0ntz j0ntz force-pushed the jon/fix/phaze-3.1 branch from 22ffdb3 to 115db6e Compare February 23, 2026 21:40
@j0ntz j0ntz disabled auto-merge February 23, 2026 21:49
@j0ntz j0ntz merged commit 0c31e90 into develop Feb 23, 2026
4 checks passed
@j0ntz j0ntz deleted the jon/fix/phaze-3.1 branch February 23, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants