Skip to content

fix(account): correct asset-DID chain + show success screen (popup no longer auto-closes)#295

Merged
zer0stars merged 1 commit into
mainfrom
fix/account-flow-chain-and-success
Jun 15, 2026
Merged

fix(account): correct asset-DID chain + show success screen (popup no longer auto-closes)#295
zer0stars merged 1 commit into
mainfrom
fix/account-flow-chain-and-success

Conversation

@zer0stars

Copy link
Copy Markdown
Member

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 137 in the account asset DID

generateAccountIpfsSource built did: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 uses kernelSigner.chain.id so the asset DID always matches the chain the grant executes on.

#2 — popup closed before the success screen (dead code)

useFinishShareAccounts called backToThirdParty(...) whenever transactionHash was falsy — and it was always undefined (the setAccountPermissions bridge returns void), so it fired on every grant and closed the popup before AccountPermissionsSuccess (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. The accountGranted payload is still sent to the parent first.

Also fixes a fex-colflex-col typo in the now-visible success screen.

Verification

src/ typechecks clean, CI=true craco build exits 0, react-scripts test 25/25. No change to live vehicle/login paths.

🤖 Generated with Claude Code

… 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.
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dimo-login Ready Ready Preview, Comment Jun 15, 2026 7:55pm

Request Review

@zer0stars zer0stars merged commit bbd70a7 into main Jun 15, 2026
1 of 2 checks passed
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.

1 participant