-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Injected Universal Provider #3177
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2da6057 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@ganchoradkov @tomiir There is a Changeset file but the Changeset bot not detecting it, maybe something wrong with the current changeset? |
* AppKit will generate its own instance by default in none provided | ||
* @default undefined | ||
*/ | ||
walletConnectProvider?: IUniversalProvider |
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.
Should we call it walletConnectProvider
(for company name matter) or universalProvider
(or similar)?
@@ -237,6 +244,10 @@ export class AppKit { | |||
// -- Public ------------------------------------------------------------------- | |||
public async open(options?: OpenOptions) { | |||
await this.initOrContinue() | |||
if (options?.uri && this.universalAdapter) { | |||
console.log('options.uri', options.uri) |
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.
Log
@@ -1580,7 +1580,8 @@ export class AppKit { | |||
} | |||
} | |||
|
|||
this.universalProvider = await UniversalProvider.init(universalProviderOptions) | |||
this.universalProvider = |
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.
I think we could avoid making changes to *-new
packages until we start working on Reskin to keep the PRs smaller
* Enable manual control of WalletConnect connections. | ||
* @default false | ||
*/ | ||
enableUniversalProviderManualControl?: boolean |
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.
Do we need this flag to expose to the users? If I'm not missing another detail, we could keep it as an internal state depending on the given walletConnectProvider
, if they provide it this will be true
, otherwise it'll be false
by default. Just to keep the extra props as low as possible
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.
Agree with Enes here. I think this can confuse user's.
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 can, the flag was to provide an option for delegating control of the provider entirely
@@ -225,6 +223,10 @@ export const ConnectionController = { | |||
TransactionsController.resetTransactions() | |||
StorageUtil.deleteWalletConnectDeepLink() | |||
}, | |||
setUri(uri: string) { |
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.
Very important - an empty line between functions xd
const showConnectors = | ||
featured.length || recommended.length || customWallets?.length || recent.length | ||
// eslint-disable-next-line no-console | ||
console.log('W3mConnectingWcBasicView.constructor()', recommended) |
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.
log
Description
Please include a brief summary of the change.
Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist