-
Notifications
You must be signed in to change notification settings - Fork 7
Add Wander Connect Strategy #12
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
base: main
Are you sure you want to change the base?
Conversation
| // Handle authentication result | ||
| if (authInfo.authStatus === "authenticated") { | ||
| this._isAuthenticated = true; | ||
| this._arweaveWallet = window.arweaveWallet; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to do this by listening to window.addEventListener("arweaveWalletLoaded", handleWalletLoaded);. Also, this is the event you should be listening to before calling connect()
| if (authInfo.authStatus === "authenticated") { | ||
| this._isAuthenticated = true; | ||
| this._arweaveWallet = window.arweaveWallet; | ||
| this._wanderConnect.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably move this option to the Connect SDK (closeAfterAuth).
Adds a strategy for Wander Connect
Users can pass the options parameter for Wander Connect's SDK constructor on the WanderConnectStrategy constructor, when creating the instances for each strategy
To simplify the integration, it hides the Wander BE button within Wander Connect because users can add that in AWK as a separate strategy. It also doesn't show the WC button nor the iframe with the wallet dashboard because AWK abstracts the usage of the wallet to avoid dealing with different UIs
It is also included in the AWK React Legacy package by default