app-monorepo icon indicating copy to clipboard operation
app-monorepo copied to clipboard

[BUG]: `window.$onekey.btc` is not available in the browser with "Default" set to off

Open JesseKuntz opened this issue 1 year ago • 4 comments
trafficstars

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:

  1. Make sure that the above setting is turned "Off".
  2. Go to https://btcstaking.testnet.babylonchain.io/
  3. Click "Connect Wallet"
  4. Select OneKey, and click the Connect button
  5. See that nothing happens

Expected behavior

The site can interact with OneKey by using the window.$onekey.btc provider.

Screenshots

image

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.

JesseKuntz avatar Aug 21 '24 20:08 JesseKuntz