-
Notifications
You must be signed in to change notification settings - Fork 720
Open
Labels
type: enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Common scenarios include:
- Rendering UI conditionally based on whether a wallet is already connected
- Avoiding flashes of incorrect UI during initial load
- Checking connection state before registering listeners
Without a synchronous state snapshot, developers either duplicate internal logic or introduce race conditions.
Describe the solution you'd like
Proposed Solution
- Add a synchronous
getConnectionState()method to the Coinbase Wallet SDK provider. - Expose a minimal, read-only snapshot including:
- connection status (connected / connecting / disconnected)
- current accounts
- current
chainId
- Ensure the snapshot is updated before any related provider events are emitted.
- Guarantee that calling the method has no side effects and performs no network requests.
Acceptance Criteria
- Developers can synchronously read the current wallet connection state.
- Snapshot data is always consistent with emitted provider events.
- Calling the snapshot API does not trigger network calls or state changes.
- Existing integrations continue to work without modification.
- Basic tests verify snapshot accuracy during connect, disconnect, and chain/account changes.
Describe alternatives you've considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request