Repository navigation
fix(dapp): name the connected wallet on every deployment, not only multi-network ones - #162
Merged
Merged
Conversation
…lti-network ones The fetch wrapper that adds the wallet header was installed only where several Stellar networks are served. Prod is built with mainnet alone, so plain fetch calls carried no wallet: naira payouts answered "Connect your wallet to cash out" to connected wallets, and payout history came back empty.
✅ Deploy Preview for useintent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for useintentadapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
On prod, connected users see "Connect your wallet to cash out" when they try to pay out naira, and their payout history is empty.
Prod logs show
/api/naira/ordersand/api/naira/ratereturning 401 to these users tonight, between 22:29 and 22:32.Cause
With sign-in paused, the server tells users apart by the wallet header the page sends.
That header is added by a fetch wrapper. The wrapper was installed only when the deployment serves more than one Stellar network. Prod is built with
NEXT_PUBLIC_STELLAR_NETWORKS=mainnetalone, so the wrapper never installed and plainfetchcalls sent no wallet.Weave cash-outs use
walletFetch, which adds the header itself, so they kept working. The Stellar naira flow, payout history and the standing-orders inbox use plainfetch, so they failed. The only users who got through had a session cookie left over from the old email sign-in.Fix
The wrapper is now installed on every deployment, in both places that set it up:
ChainProviderand the connect page.It covers every page's calls on every chain.
Checks
/api/naira/ordersand/api/naira/ratecarry the wallet header.oneclick-origintiming flake, which passes alone (89/89).