mycrypto.com
mycrypto.com copied to clipboard
Messages signed with a Trezor don't verify without a Trezor
The signed message verification doesn't work properly for Trezors. It currently requires that any message signed with a trezor is verified with a trezor.
https://github.com/MyCryptoHQ/mycrypto.com/blob/master/app/scripts/controllers/signMsgCtrl.js#L150
I believe this code was inherited from MyEtherWallet, although MEW has updated their code to correct this issue:
https://github.com/kvhnuke/etherwallet/blob/mercury/app/scripts/controllers/signMsgCtrl.js#L178
Would be nice if MyCrypto did the same.
Here's an example message sign using MyCrypto:
{
"address": "0x01bc58678b6aef694ef598de3e2a30e4e501278f",
"msg": "Test message for Github issue",
"sig": "0x7b940926a983cac4f6c196f030a2dd1ff985e0740b0704b17030c730a6116e22683af5a434d813c12acf0d8b5ea0caa1efd4443aea3a9da13f45ce8554cd58da1c",
"version": "2"
}
If I verify the message with my Trezor connected, it works. However, if I disconnect it, I get (error_12) Invalid signed transaction.
If I update the verison to "3" and set "signer" to "trezor", I can verify the message on MEW without my Trezor connected.
{
"address": "0x01bc58678b6aef694ef598de3e2a30e4e501278f",
"msg": "Test message for Github issue",
"sig": "0x7b940926a983cac4f6c196f030a2dd1ff985e0740b0704b17030c730a6116e22683af5a434d813c12acf0d8b5ea0caa1efd4443aea3a9da13f45ce8554cd58da1c",
"version": "3",
"signer": "trezor"
}