fix(account): correct asset-DID chain + show success screen (popup no longer auto-closes)#295
Merged
Merged
Conversation
… instead of auto-closing - generateAccountIpfsSource: use kernelSigner.chain.id (polygon 137 / amoy 80002) for the account asset DID instead of hardcoding 137 — the hardcode orphaned the grant on non-prod environments. - useFinishShareAccounts: stop calling backToThirdParty on finish. transactionHash was always undefined so it always fired, closing the popup before the AccountPermissionsSuccess screen (which owns the 'Back to <app>' button) was ever shown. Now mirrors the vehicle flow: show the success screen, let it own return. - Fix 'fex-col' -> 'flex-col' typo in the now-visible success screen.
|
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.
Follow-up to #294, fixing the two verified account-flow bugs before the login-with-dimo SDK is published (which activates this flow).
#3 — hardcoded chain
137in the account asset DIDgenerateAccountIpfsSourcebuiltdid:ethr:137:<grantor>, but the kernel signer runs on polygonAmoy (80002) in dev/non-prod. The grant was executed on Amoy while the SACD asset claimed 137 — an orphaned grant on every non-prod env. Now useskernelSigner.chain.idso the asset DID always matches the chain the grant executes on.#2 — popup closed before the success screen (dead code)
useFinishShareAccountscalledbackToThirdParty(...)whenevertransactionHashwas falsy — and it was always undefined (thesetAccountPermissionsbridge returnsvoid), so it fired on every grant and closed the popup beforeAccountPermissionsSuccess(which has the "Back to " button) was ever shown. Now mirrors the vehicle flow (useFinishShareVehicles): show the success screen and let it own the return; embedders navigate themselves. TheaccountGrantedpayload is still sent to the parent first.Also fixes a
fex-col→flex-coltypo in the now-visible success screen.Verification
src/typechecks clean,CI=true craco buildexits 0,react-scripts test25/25. No change to live vehicle/login paths.🤖 Generated with Claude Code