Skip to content

fix(ConnectWalletForm): remove no consent error from background#1309

Merged
sidvishnoi merged 7 commits intomainfrom
connect-wallet-remove-no-consent-bg-error
Feb 27, 2026
Merged

fix(ConnectWalletForm): remove no consent error from background#1309
sidvishnoi merged 7 commits intomainfrom
connect-wallet-remove-no-consent-bg-error

Conversation

@sidvishnoi
Copy link
Copy Markdown
Member

@sidvishnoi sidvishnoi commented Feb 26, 2026

Context

Part of #1238 (trying to simplify error logic)
Part of #957
Follow up of #1308

Changes proposed in this pull request

Instead of sending a connect wallet request to background, which then throws noConsent error, ask for consent on client side (ConnectWalletForm) early if we know key is not added and automatic key addition is supported.

Makes the flow faster, less error handling (even lesser eventually), and less "fake errors" in logs.

@github-actions github-actions Bot added area: background Improvements or additions to extension background script area: popup Improvements or additions to extension popup area: pages Changes to any of extension's pages area: shared Changes to shared libraries and utilities labels Feb 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

Extension builds preview

Name Link
Latest commit 506d157
Latest job logs Run #22480800147
Chrome (1.36MB)Download
Firefox (1.36MB)Download
Safari (2.31MB)Download

Base automatically changed from connect-wallet-simpler-logic to main February 26, 2026 15:09
Comment on lines -111 to +123
state?.status === 'error:key'
state?.status === 'error:key' ||
(state?.status === 'error' &&
typeof state.error === 'object' &&
state.error?.key === 'connectWallet_error_invalidClient')
? toErrorInfo(deepClone(state.error))
: null,
connect:
state?.status === 'error' ? toErrorInfo(deepClone(state.error)) : null,
state?.status === 'error' &&
(typeof state.error === 'object'
? state.error.key !== 'connectWallet_error_invalidClient'
: true)
? toErrorInfo(deepClone(state.error))
: null,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This situation will be improved in coming follow-ups.

@sidvishnoi sidvishnoi merged commit 60b87b8 into main Feb 27, 2026
13 checks passed
@sidvishnoi sidvishnoi deleted the connect-wallet-remove-no-consent-bg-error branch February 27, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: background Improvements or additions to extension background script area: pages Changes to any of extension's pages area: popup Improvements or additions to extension popup area: shared Changes to shared libraries and utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants