Skip to content
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

[BUG]: Bitcoin chain cannot be signed using the 'signature' function. #4332

Open
pi-bitstable opened this issue Mar 25, 2024 · 6 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@pi-bitstable
Copy link

pi-bitstable commented Mar 25, 2024

image

import React from 'react'

export default function Test() {
  async function signMessage() {
    const provider = getProvider()
    if (!provider) return

    try {
      const [account] = await provider.requestAccounts()
      const message = '010203'
      const result = await provider.signMessage(message)
      alert(JSON.stringify([account, result]))
    } catch (error) {
      alert('An error occurred during the signMessage() call.')
    }
  }

  function getProvider() {
    const provider = (window.$onekey && window.$onekey.btc) || window.unisat

    if (!provider) {
      alert('No BTC provider.')
      return undefined
    }
    return provider
  }
  return <button onClick={signMessage}>Test</button>
}
  • Errror Content
{"name":"Error","message":"Sign message is not supported on hardware.","stack":"Error: Sign message is not supported on hardware.\n    at Object.custom (file:///81172.bundle.js:2:636267)\n    at r.<anonymous> (file:///main.43dd7041.bundle.js:1:28721)\n    at Generator.next (<anonymous>)\n    at n (file:///48751.bundle.js:2:1502161)\n    at s (file:///48751.bundle.js:2:1502364)\n    at file:///48751.bundle.js:2:1502423\n    at new Promise (<anonymous>)\n    at r.<anonymous> (file:///48751.bundle.js:2:1502304)\n    at r.<anonymous> (file:///main.43dd7041.bundle.js:1:29224)\n    at r.<anonymous> (file:///main.43dd7041.bundle.js:1:926)","code":4003}
  • API Docs
    https://developer.onekey.so/connect-to-software/webapp-connect-onekey/btc/api-reference/signmessage
@pi-bitstable pi-bitstable added the bug Something isn't working label Mar 25, 2024
@originalix
Copy link
Contributor

Unfortunately, the hardware doesn't currently support psbt signing, but support for this is in the works.

@pi-bitstable
Copy link
Author

@originalix I think the status shouldn't be closed? Wait for completion before closing.

When can I use the signature feature? Is there an exact time?
Currently, many customers report that it cannot be used normally.

@originalix originalix reopened this Mar 25, 2024
@pi-bitstable pi-bitstable changed the title [BUG]: The Bitcoin chain cannot evoke the signature. [BUG]: Bitcoin chain cannot be signed using the 'signature' function. Mar 26, 2024
@pi-bitstable
Copy link
Author

pi-bitstable commented Mar 26, 2024

hi, @originalix .
Is there a schedule to fix this issue?
Many users in the community use OneKey to transfer funds. If they cannot sign, they cannot verify that the wallet belongs to the user.

https://docs.unisat.io/dev/unisat-developer-service/unisat-wallet#signmessage

It's just the signature message, not signPsbt

@ByteZhang1024 ByteZhang1024 self-assigned this Mar 27, 2024
@pi-bitstable
Copy link
Author

Has this problem been resolved?

@ByteZhang1024
Copy link
Contributor

At present, there is not much effort in this major version, and this issue will be fixed in the next major version.

@pi-bitstable
Copy link
Author

目前这个大版本还没有做太多的努力,这个问题会在下一个大版本中修复。

Is there a date for the next major version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants