Skip to content

fix(card-spend): skip the module read on a Safe not yet deployed on Fuse - #2590

Merged
MayankMittal1 merged 1 commit into
masterfrom
mayank/fix/undeployed-safe-module-read
Sep 26, 2026
Merged

MayankMittal1 merged 1 commit into
masterfrom
mayank/fix/undeployed-safe-module-read

Conversation

@MayankMittal1

@MayankMittal1 MayankMittal1 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Since #2589, new Wirex cardholders can't activate their card. Pressing Activate card fails with:

Card not activated — The contract function "getModulesPaginated" returned no data ("0x") … no card was created, please try again.

#2589 made first-time set-up read the Safe's module list so it can disable any retired v2 core. Before that, the list was only read when v1 had to come off. A new cardholder's Safe is often not deployed on Fuse yet, because the set-up batch is what deploys it. On an address with no code, getModulesPaginated returns 0x and viem throws.

Confirmed on the reported Safe: eth_getCode(0x07e96000b9F96057a0EEA88b84508eCc6E69F29b) on Fuse returns 0x.

The failure happens before anything is signed, so no consents are filed and no card is created. The user just can't get past the screen.

Fix

encodeModuleDisables now calls getCode first. A Safe with no code has no modules, so it returns an empty cleanup, and the batch deploys and registers the Safe as it did before #2589. Deployed Safes follow the same path as before.

The mode-switch path needs an already-registered (so already deployed) Safe, so it was never affected.

Testing

  • tsc --noEmit: no errors in the changed file.
  • lib/utils/__tests__/safeModules.test.ts passes (11/11). It covers buildModuleDisables, which this PR doesn't change. The new guard is in a private helper in the hook and has no direct test.

Rollout

Every build with #2589 is affected, so this should ship as an OTA update.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

65138da made card set-up read the Safe's module list on every v2 set-up, to
disable any retired v2 core. A new cardholder's Safe is often still
counterfactual on Fuse — the set-up batch is what deploys it — so
`getModulesPaginated` returns `0x`, viem throws, and activation fails with
"Card not activated" before anything is signed.

A Safe with no code has no modules, so there is nothing to disable: return an
empty cleanup and let the batch deploy and register the Safe as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 26, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Sep 26, 2026 11:47am UTC
solid-app-staging Ignored Ignored Sep 26, 2026 11:47am UTC

Request Review

@MayankMittal1
MayankMittal1 merged commit 65de8ad into master Sep 26, 2026
6 of 7 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