-
Notifications
You must be signed in to change notification settings - Fork 572
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
Passing SDK config params to injected provider #1436
Conversation
✅ Heimdall Review Status
|
if (preference.options !== 'smartWalletOnly') { | ||
const extension = getCoinbaseInjectedLegacyProvider(); | ||
if (extension) { | ||
const { appName, appLogoUrl, appChainIds } = metadata; | ||
extension.setAppInfo?.(appName, appLogoUrl, appChainIds); | ||
extension.setAppInfo?.(appName, appLogoUrl, appChainIds, preference); |
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.
adding it for extension too, just in case we need to use it, no harm even if we dont
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.
Did you test this on the extension side? Maybe include a video in the PR description?
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.
added demo!
Summary
extended the setAppInfo pattern to RN's in app browser provider.
This is used to block EOA account to connect to smartWalletOnly app, and also enables adding data suffix in future RN smart wallet account
we are passing flattened params, including metadata and preference, this is for maximizing compatibility across App SDK version in case of future App SDK config structure change
How did you test your changes?
Manually, demo attached in RN's PR
Demo: noop on current extension
Screen.Recording.2024-10-25.at.1.35.03.PM.mov