Skip to content

fix(core): deduplicate sapient wallets across address casing - #1074

Open
zakazaka95 wants to merge 1 commit into
0xsequence:masterfrom
zakazaka95:fix/cached-sapient-wallet-addresses
Open

zakazaka95 wants to merge 1 commit into
0xsequence:masterfrom
zakazaka95:fix/cached-sapient-wallet-addresses

Conversation

@zakazaka95

Copy link
Copy Markdown

When the cache and source return the same sapient wallet using lowercase and checksum addresses, Cached.getWalletsForSapient currently returns two entries and treats the wallet as missing during witness synchronization.

Normalize both providers' address keys before merging, matching getWallets. This preserves source precedence and avoids redundant witness writes. The regression tests cover both casing directions and a lowercase source-only wallet; the previous normalization fixture contained only digits and could not exercise this case.

Validation:

  • New and strengthened assertions fail on the original implementation (4 failed, 30 passed).
  • pnpm --filter @0xsequence/wallet-core exec vitest run test/state/cached.test.ts test/state/utils.test.ts: 48 passed.
  • Wallet core typecheck, ESLint for the changed TypeScript files, Prettier, and git diff --check pass.

Includes a patch changeset for @0xsequence/wallet-core.

@zakazaka95
zakazaka95 requested a review from a team November 27, 2026 23:26
@zakazaka95
zakazaka95 requested a review from a team as a code owner November 27, 2026 23:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T23:27:34.232487Z 91a71ea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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