app-monorepo
app-monorepo copied to clipboard
[BUG]: `window.$onekey.btc` is not available in the browser with "Default" set to off
Describe the bug
On version 5.1.0 of OneKey extension in Chrome, window.$onekey.btc is not available in the browser unless "Default Wallet Settings > Set OneKey as Default Wallet" is set to "On".
This is an issue because even though OneKey is installed in the browser, a site has no way of detecting / interacting with it unless it instructs a user to turn this setting to the "On" position.
To Reproduce Steps to reproduce the behavior:
- Make sure that the above setting is turned "Off".
- Go to https://btcstaking.testnet.babylonchain.io/
- Click "Connect Wallet"
- Select OneKey, and click the Connect button
- See that nothing happens
Expected behavior
The site can interact with OneKey by using the window.$onekey.btc provider.
Screenshots
Desktop (please complete the following information):
- OS: [MacOS]
- Browser [Chrome]
- Version [127]
Additional context
Note: the app linked in the steps to repro is actually using window.$onekey.btcwallet, but it is still an issue for window.$onekey.btc and window.unisat as well.