[BUG]: `window.$onekey.btc` is not available in the browser with "Default" set to off
Closed this issue · 6 comments
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.
The "Set OneKey as Default Wallet" option is turned on by default, unless you manually turn it off.
@ByteZhang1024 I understand that, but I can't imagine that it'd be unlikely for a user to have another browser wallet that they'd like to use for other assets, and OneKey overrides it unless that setting is turned off.
Additionally, this is something that was working in the previous version, but seems broken in the current version. Previously, we were able to turn off "Wallet Switch" for certain networks and we'd still be able to access window.$onekey.btc
or window.$onekey.btcwallet
, so it feels like we're losing that functionality.
Is there a way that we can have "Set OneKey as Default Wallet" turned off but still access window.$onekey.btc
or window.$onekey.btcwallet
?
Yes, what you're saying is reasonable, and we will make modifications according to your expectations.
It will be possible to turn off "Set OneKey as Default Wallet" while still being able to access window.$onekey
.
@ByteZhang1024 thats great news, thank you!
Fixed at v5.1.4 chrome extension and v5.2.0 for all platfom.
@JesseKuntz
Version 5.1.4 has been released, and this issue has been fixed.