Closed Jenny0115 closed 10 months ago
@habibitcoin Thanks for your reply and suggestions. Let me provide some more details hera: Since OneKey is a multi-chain wallet, and we will inject the identifier of some other wallets to connect to OneKey when some DApps do not provide OneKey entry
For example, the OneKey plug-in will inject window.ethereum
and window.unisat
into the page and provide same method implementations as other wallets. And we also provide window.$onekey which contains all supported chain implementations, such as
window.$onekey = {
btc,
ethereum,
webln,
tron,
....
};
And the contents provided by window.$onekey.btc
and window.unisat
, as well as window.ethereum
and window.$onekey.ethereum
are the same.
Since the implementation of onekey's internal btc provider is exactly the same as unisat, according to your code, here we want to set the domain to unisat.io
. This is the simplest way to work.
Or we just set
{
name: "OneKey",
image: "/images/logo/onekey.png",
provider: "onekey",
onClick: () => {
onConnect("onekey", callback);
}
}
and you will update the code in nosft-core
to adapt to window.$onekey.btc
Which way do you think is better?
@weatherstar let me know what you think of this approach: https://github.com/deezy-inc/deezy-place/pull/326
I think it accomplishes the same goal, and also encourages usage of the .btc provider as opposed to the .ethereum provider
✅ Deploy Preview for deezy-place ready!
Toggle QR Code...
Use your smartphone camera to open QR code link.
To edit notification comments on pull requests, go to your Netlify site configuration.