tronprotocol / tronwallet-adapter

MIT License
64 stars 29 forks source link

TronLink error `Failed to sign transaction by v2: Invalid transaction provided` when signing a hash message #40

Closed alienzhangyw closed 1 year ago

alienzhangyw commented 1 year ago

I have a hashed message to be signed: 0x4a3264ece439ed1a76ba692380cce39da2eb570b78b0572259fe8c0e528f30e6, According to TronWeb doc: https://tronweb.network/docu/docs/Sign%20and%20Verify%20Message

If you only want to sign a hash, you should convert your hash string to an Bytes Array first using TronWeb.utils.ethersUtils.arrayify utility function.

So I use TronWeb.utils.ethersUtils.arrayify to turn it to a Uint8Array with a length of 32. Then pass the Uint8Array to TronLinkAdapter.signMessage. Then I got this error from TronLink browser plugin: Failed to sign transaction by v2: Invalid transaction provided. image

Please tell me what is wrong.

https://github.com/tronprotocol/tronweb/issues/447

way2ex commented 1 year ago

It seems that it'a a bug of TronLink Extension. Please contact TronLink community.