[BUG]: createWalletLinkConfig silently ignores an explicit storage: null
@Muneerali199 がすでに取り組んでいます。
2026年11月14日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- blockchain
調査の方向性
バグは src/config.ts にあります。storage オプションのドキュメントは37-40行目、storage ?? ... のフォールバックは95-98行目にあります。createWalletLinkConfig が storage を wagmi にどう渡しているかを読み、明示的な null と省略された値が区別されているかを確認してください。storage: null が ssr: false と ssr: true の両方で null を返し、テストが両方のケースを網羅していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
StabilityNexus/WalletLink のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
Support CSP nonce for the injected connect-UI stylesheet対応中かも @Muneerali199 が 9 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
StabilityNexus/WalletLink の issue をすべて見る
似ている issue
-
[BUG]: Shared links drop the configured basePath on GitHub Pages対応中かも @anshulchikhale30-p が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: GTrekkerオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
メンテナーはふだん 1 日以内に返信
-
area: ui Bug Payload OSS
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
payloadcms/payload#19839 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信