Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): replace isReconnecting with unified isReady state #335

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented Jan 17, 2025

Description

This PR builds on @stefanofa's excellent contribution in #330 which added isReconnecting to the React implementation. It expands that concept into a unified isReady state that works consistently across all framework implementations (React, Vue, and Solid).

Details

  • Add managerStatus to core state management
  • Add isReady getter to WalletManager class
  • Remove React-specific isReconnecting state
  • Add isReady to all framework implementations
  • Update documentation to reflect new approach
  • Add comprehensive tests across all implementations
  • Make persisted state validation more accurate

Add `managerStatus` to track wallet manager initialization state and expose
`isReady` getter in React, Vue, and Solid implementations. This allows
consumers to know when the wallet manager has completed initialization
and is ready for use.

- Add `managerStatus` to `State` type and `defaultState`
- Add `status` and `isReady` getters to `WalletManager` class
- Remove `isReconnecting` from React implementation (see PR #330)
- Add `isReady` to all framework implementations
- Add tests for `isReady` behavior
Replace `isReconnecting` with `isReady` in React quick start guide to reflect
the new unified approach to wallet manager initialization state across all
framework implementations. Update example code and description to be more
descriptive and user-friendly.
@drichar drichar merged commit fe252c9 into main Jan 17, 2025
1 check passed
@drichar drichar deleted the feat/manager-status-isready branch January 17, 2025 04:00
@stefanofa
Copy link
Contributor

Hey @drichar, sorry for completely missing your comment on the other PR! I really appreciate you taking the time to expand on the idea and generalize it across all frameworks. Your approach with isReady makes a lot of sense and keeps things more consistent across the library. Great work, and thanks for building on this! 🚀

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.

2 participants