-
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
Option to select xverse as default browser wallet in settings #774
Option to select xverse as default browser wallet in settings #774
Conversation
}); | ||
}); | ||
} | ||
|
||
removeItem(key: string): Promise<any> { | ||
removeItem(key: string): Promise<void> { |
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 tried changing this and the setItem one to boolean, but the seedVault stuff started to complain. Checking the rest of the code, nothing was actually using the return value, so I removed it.
}); | ||
}); | ||
} | ||
|
||
getItem<T = any>(key: string): Promise<T> { | ||
getItem<T = any, D = undefined>(key: string, defaultValue?: D): Promise<T | D> { |
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.
By default, the storage interface returns an empty object if the key is not present, resulting in a response of undefined. The Seed Vault expects null though, so I had to add this default value.
…s-default-browser-wallet-in-the
Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/7738374490 |
@m-aboelenein merged before it was tested! |
I tested this one, and the change is pretty minimal we can retest with the RC |
🔘 PR Type
What kind of change does this PR introduce?
📜 Background
When a user connects to an extension wallet, if there are multiple wallets implementing the sats connect interface, then the last wallet loaded would get all event messages. A user may want to force Xverse as the priority wallet to intercept these messages if the app using sats connect is using the default providers.
🔄 Changes
This adds a new setting toggle to set Xverse as the priority sats-connect wallet.
Note that the setting is stored in chrome storage so that it's available from the content-script directly without having to send messages around.
🖼 Screenshot / 📹 Video
✅ Review checklist
Please ensure the following are true before merging: