Skip to content

Improve address book account search performance#1954

Merged
piatoss3612 merged 4 commits into
developfrom
fix/address-book-account-search-performance
Jun 2, 2026
Merged

Improve address book account search performance#1954
piatoss3612 merged 4 commits into
developfrom
fix/address-book-account-search-performance

Conversation

@piatoss3612
Copy link
Copy Markdown
Member

@piatoss3612 piatoss3612 commented Jun 1, 2026

Summary

  • Load My account keys once when the address book modal opens, then filter account names and displayed addresses locally as the user types.
  • Clear cached account rows when the modal is closed or a new account fetch starts so stale rows from a previous chain cannot be selected while the new fetch is pending.
  • Constrain background keyring bech32 address search to recognized address-prefix inputs such as cosmos1...; name-like queries such as dev or broad chain-prefix-only queries such as cosmos no longer trigger expensive per-wallet address scans.

Root Cause

The My account tab was sending a background search request after each debounced search update. For non-hex text of length 3 or more, the shared keyring search could also treat broad strings as bech32 address substring searches and scan Cosmos/Ethermint addresses across wallets. That made simple wallet-name searches feel delayed even with a small number of accounts.

User Impact

Wallet name search, hex address search, and explicit bech32 address-prefix search such as cosmos1... continue to work. The intentionally narrowed behavior is that a bare chain prefix like cosmos is treated as text/name search, not as an address search that matches every Cosmos address.

Validation

  • yarn workspace @keplr-wallet/background test src/keyring/service.spec.ts --runInBand
  • yarn workspace @keplr-wallet/background typecheck
  • yarn workspace @keplr-wallet/extension typecheck
  • yarn prettier --check packages/background/src/keyring/service.ts packages/background/src/keyring/service.spec.ts apps/extension/src/components/address-book-modal/index.tsx
  • git diff --check

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

Project Deployment Actions Updated (UTC)
keplr-wallet-extension Ready Ready Preview, Comment Jun 1, 2026 8:10am

Request Review

@piatoss3612 piatoss3612 marked this pull request as ready for review June 1, 2026 07:42
@piatoss3612 piatoss3612 requested a review from a team as a code owner June 1, 2026 07:42
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f8221ad79

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/extension/src/components/address-book-modal/index.tsx
@piatoss3612 piatoss3612 merged commit aea8be2 into develop Jun 2, 2026
14 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