Conversation
…er gets a session When a wallet connects but authorization doesn't complete (auto-authorize failed/cancelled — common when multiple Cardano extensions fight over window.cardano), layout sets hasCheckedSession=true and never reopens the auth modal. createUser stays 403 (no session), `user` stays null, and the Connect button spins "Loading…" forever with no recovery path. - Relabel that state: connected + user-query-resolved-empty now shows an actionable "Authorize" instead of an infinite "Loading…" spinner. - Add an "Authorize wallet" item to the connect dropdown (shown when connected but unauthorized) that bumps a new reauthNonce signal. - layout watches reauthNonce, clears the hasCheckedSession latch, and refetches the session so the existing session-check effect reopens the (now signData-fixed) WalletAuthModal. Additive and manual-trigger only — no change to connect/sign/session logic, no auto-retry loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(auth): recover from stuck "Loading…" when wallet has no session
…ck "Loading…") THE root-cause fix for the stuck "Loading…": layout fed userAddress / the session check / createUser from hex-encoded addresses (react-2.0 useAddress() and raw CIP-30 getUsedAddresses/getUnusedAddresses), but user records and sessions are keyed by bech32 — so getUserByAddress(hex) returned null and the app hung. Confirmed live on preprod: getUserByAddress(addr1qyvgdy2…) finds the user; getUserByAddress(0118869144…) → null (same wallet). - Normalize `address` once at the useAddress() source so every consumer (store sync, walletAddressForSession/Check, createUser) uses bech32. - Normalize the getUsedAddresses()/getUnusedAddresses() setUserAddress sites. (The equivalent change was authored alongside #281 but merged after that PR was already squashed, so it never reached preprod — this carries it, plus the session/createUser hardening, with the required import.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(auth): normalize all userAddress sources in layout to bech32 (stuck "Loading…")
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Promotes preprod → main. Small, focused release — the wallet auth stuck-"Loading…" fixes.
Included
layout.tsxfeduserAddress/ the session check /createUserfrom hex addresses (react-2.0useAddress()and raw CIP-30getUsedAddresses), but user records and sessions are keyed by bech32 — sogetUserByAddress(hex)returned null and the app hung on "Loading…". Now normalizesaddressat theuseAddress()source plus the rawgetUsedAddresses/getUnusedAddressessites. Verified live:getUserByAddress(addr1qyvgdy2…)finds the user; the hex form returns null (same wallet).window.cardano), the connect button now shows an actionable "Authorize" with a dropdown re-authorize, instead of spinning "Loading…" forever.Notes
multisig-v1-smokecheck is failing on a depleted CI bot wallet ("UTxO Balance Insufficient"), unrelated to these changes — same funds issue flagged on Release: preprod → main #280–fix(auth): normalize all userAddress sources in layout to bech32 (stuck "Loading…") #282.Test plan
npx tsc --noEmitclean; unit + trpc tests pass; Vercel preview built.getUserByAddresscalls).🤖 Generated with Claude Code