[BUG]: createWalletLinkConfig silently ignores an explicit storage: null
@Muneerali199 is already working on this.
Since Nov 14, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- blockchain
Research direction
The bug is in src/config.ts: the storage option's docs are at lines 37-40, and the storage ?? ... fallback is at lines 95-98. Read how createWalletLinkConfig passes storage to wagmi, then check that an explicit null is distinguished from an omitted value. Done when storage: null yields null with both ssr: false and ssr: true, and a test covers both cases.
Written by the indexing model from the issue text.
Description
Describe the bug
createWalletLinkConfig documents that "A caller-supplied storage always wins", but the implementation uses:
storage: storage ?? (ssr ? createStorage({ storage: cookieStorage }) : undefined),
?? only falls back for null and undefined, so an explicit storage: null is treated exactly like an omitted value. In wagmi, null is meaningful: it disables persistence (CreateConfigParameters['storage'] is typed Storage | null | undefined).
Impact
A caller cannot opt out of connection persistence:
ssr: false+storage: null->undefinedis passed to wagmi, which falls back to its default localStorage storage.ssr: true+storage: null-> cookie storage is used instead of disabling persistence.
This can persist wallet connection state in environments where the caller explicitly asked for it not to be persisted.
Evidence
src/config.ts:37-40— thestorageoption and its docs.src/config.ts:95-98—storage ?? ....node_modules/@wagmi/core/dist/types/createConfig.d.ts:13—storage?: Storage | null | undefined.
Steps to reproduce
const config = createWalletLinkConfig({ chains: [sepolia], storage: null })
console.log(config.storage) // not null
Proposed fix
Use an explicit undefined check:
storage: storage !== undefined
? storage
: (ssr ? createStorage({ storage: cookieStorage }) : undefined),
and add a test covering storage: null with both ssr: false and ssr: true.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/WalletLink
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Support CSP nonce for the injected connect-UI stylesheetPossibly taken @Muneerali199 claimed this 9 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 38/100
All issues in StabilityNexus/WalletLink
Similar issues
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPossibly taken @anshulchikhale30-p claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comment ·
Maintainers usually reply within 1 day
-
Add: GTrekkerOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
Maintainers usually reply within 1 day
-
area: ui Bug Payload OSS
Difficulty 1/5 Under an hour Newbie friendliness 88/100
payloadcms/payload#19839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day