-
Notifications
You must be signed in to change notification settings - Fork 25
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
Refactor/use hooks #452
Merged
Merged
Refactor/use hooks #452
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: Ben Kremer <[email protected]>
Co-authored-by: Ben Kremer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
@web3inbox/core
&@web3inbox/react
still in canary here.WalletConnect/web3inbox-client#75
Description
1. Package Changes
Note
Summary: Remove
rxjs
andnotify-client-js
in favor of@web3inbox/react
and@web3inbox/core
Additions
@web3inbox/core
: To enable@web3inbox/react
@web3inbox/react
: To replace internal notify hooks and facades@web3inbox/core/valtio
: To act as simple storage for modal stateRemovals
rxjs
: It is now unnecessary with the addition of@web3inbox/core/valtio
. Its features are no longer utilized@walletconnect/notify-client
: It is now unnecessary with the addition of@web3inbox/core
, as core comes prepackaged with it2. Pattern changes
Note
Summary:
w3iProxy
and related abstractions are gone. Event based reactivity is gone. Simple react hooks used instead. Also, the app is no longer externally configurable:providers
,ui
anddappOrigin
included here.Reactivity
rxjs
Observers
andemitter.on
. Instead, simple react state changes are reacted to.Abstraction
src/w3iProxy
folder is DELETED. In short, this means that the old abstraction chain of:W3iContext -> W3iProxy -> W3iNotifyFacade -> InternalNotifyProvider -> notify-client-js
is gone. It has been replaced with@web3inbox/react
directly, there is no abstraction over this in the Web3Inbox codebase.observableController
and relatedobserve
methodsExternal Control
providerQueryHooks
as this app is no longer controllable externallyuiHooks
as this app's UI is no longer configurabledappOrigin
state as Web3Inbox is no longer supported as an externally controllableiframe
.3. Authentication
Note
Authentication is now coupled with
wagmi
directly.w3iAuthFacade
and all related abstractionsauthHooks
to use wagmi directly4. Chat
Note
No more chat related features and components.
messages
components. There is no longer any UI components related tomessages
5. Components
Note
Summary: Responsibility is delegated among components. Not all actions happen in a central place now.
SignatureModal
Signature Modal now has full responsibility of initiating and completing registration.
PreferencesModal
Preferences modal now has full responsibility of updating scopes.
UnsubscribeModal
Unsubscribe modal now has full responsibility of unsubscribing from a dapp.
Login Page
Now depends on
notifyRegisteredKey
to know if registration is complete. Old extra logic is removed as app is no longer externally configurable6. Navigation
Note
Navigation to dapps is now via
domain
and not topic.7. Push Notifications
Note
Push notifications are enabled via push notification util
registerWithPushServer
from@web3inbox/core
8. Widget Pages
Note
Have been removed
9. State Management
Note
Modals.tsx
now usesvaltio
instead ofrxjs
to maintain state.Type of change
Checklist: