Fall back to Bitrefill when Phaze is remotely disabled - #6197
Conversation
asInfoRollup drops every key it does not know, and edge-info-server 3.12.0 has
no giftCardInfo, so the remote gift card enable/disable config never reached the
app: the store always reported every provider enabled no matter what the info
server served. Keep the raw payload alongside the cleaned rollup and parse the
field there with the cleaner the app already owns.
edge-info-server 3.13.0 does define giftCardInfo, but it also star-exports an
attestation module that pulls jose's node build, whose require('crypto') Metro
cannot resolve, so the bump is not currently an option.
5093e95 to
7aca8b9
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7aca8b9. Configure here.
Every gift card scene is backed by Phaze, so a remote disable through the info server's giftCardInfo still left the Spend flow entering those scenes: the market scene built the Phaze provider (which registers a Phaze identity) and fetched a catalog whose brands it then filtered away entirely, and an account with purchase history landed on the list scene, which polls the Phaze API every ten seconds. Route both entry points through pickGiftCardDestination, which sends an unusable Phaze straight to the Bitrefill webview, and gate the market scene's provider and queries on the same check so nothing touches Phaze while it is off. With Bitrefill disabled as well the market scene says so instead of rendering an empty grid.
7aca8b9 to
576a826
Compare
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.




Description
Asana: https://app.asana.com/0/1215088146871429/1218192628740167
The info server serves
giftCardInfo: { disablePlugins: { phaze: true } }and the app ignores it.The remote config never reaches the app.
updateGiftCardInforeadsgiftCardInfooffinfoServerData.rollup, which is the payload afterasInfoRollupran. That cleaner drops every key it does not know, andedge-info-server@3.12.0has nogiftCardInfo, so the store has always reported every gift card provider enabled no matter what the info server serves. The remote enable/disable feature has been inert since it shipped in 4.49.0. This PR keeps the raw payload asinfoServerData.rollupRawand parses the field there with the cleaner the app already owns.Bumping the dependency instead does not work.
edge-info-server@3.13.0does definegiftCardInfo, but it also star-exports an attestation module that pullsjose's node build, and Metro cannot resolve itsrequire('crypto'): the app red-screens withUnable to resolve module crypto from .../jose/dist/node/cjs/runtime/digest.js. That is worth fixing upstream so the typed rollup can carry the field, and it is not a prerequisite here.A disabled Phaze still routed into Phaze-backed scenes. Even with the config flowing, the Spend entry points consulted only
ENV.PLUGIN_API_KEYS.phaze.apiKey. An account with purchase history landed on the list scene, which polls the Phaze API every ten seconds. Everyone else landed on the market scene, which built the Phaze provider (registering a Phaze identity along the way) and fetched a catalog whose brands it then filtered away entirely. Both entry points now go throughpickGiftCardDestination, which sends an unusable Phaze straight to the Bitrefill webview, and the market scene gates its provider and its queries on the same check so nothing touches Phaze while the provider is off. With Bitrefill disabled as well, the market scene says gift cards are unavailable instead of rendering an empty grid.One tradeoff needs a ruling. A disabled Phaze now hides the EdgeSpend list scene for accounts holding Phaze vouchers, because that scene is Phaze-only and its polling is what the disable exists to stop. If unredeemed vouchers must stay reachable during a disable, that needs its own surface rather than the current scene.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Medium Risk
Changes Spend/gift-card routing and info-server config plumbing; mis-parsing
rollupRawor wrong disable checks could hide providers or leave Phaze traffic running when it should be off.Overview
Fixes gift card remote kill-switch that never applied because
giftCardInfowas read from the typed info rollup afterasInfoRollupstripped unknown keys. The app now keepsrollupRawand parsesdisablePluginswith its own cleaner so info-server flags actually reach Redux.Spend and gift-card navigation go through
pickGiftCardDestination: when Phaze is off (no API key or whole-provider disable), users open the Bitrefill plugin directly instead of Phaze list/market scenes that would register identities, poll, or fetch catalogs. Per-brand Phaze disables still allow the market; if Bitrefill is disabled too, the market shows a providers unavailable message.GiftCardMarketSceneanduseGiftCardProviderhonor the same Phaze-off check (enabled: false) so no Phaze network work runs while disabled. Home defers Spend tonavigateToGiftCardsand adjusts the tile footer when Phaze isn’t available. Unit tests cover the routing matrix.Reviewed by Cursor Bugbot for commit 576a826. Bugbot is set up for automated code reviews on this repo. Configure here.