mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 11:39:03 +00:00
device_tests: cashaddr test in sign/verify message
This commit is contained in:
parent
edfc857013
commit
5e14a5f059
@ -34,6 +34,12 @@ class TestMsgSignmessage(TrezorTest):
|
||||
assert sig.address == 'mirio8q3gtv7fhdnmb3TpZ4EuafdzSs7zL'
|
||||
assert hexlify(sig.signature) == b'209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'
|
||||
|
||||
def test_sign_bch(self):
|
||||
self.setup_mnemonic_nopin_nopassphrase()
|
||||
sig = self.client.sign_message('Bcash', [0], "This is an example of a signed message.")
|
||||
assert sig.address == 'bitcoincash:qqj22md58nm09vpwsw82fyletkxkq36zxyxh322pru'
|
||||
assert hexlify(sig.signature) == b'209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'
|
||||
|
||||
def test_sign_long(self):
|
||||
self.setup_mnemonic_nopin_nopassphrase()
|
||||
sig = self.client.sign_message('Bitcoin', [0], "VeryLongMessage!" * 64)
|
||||
|
@ -124,6 +124,16 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
)
|
||||
assert res is False
|
||||
|
||||
def test_message_verify_bcash(self):
|
||||
self.setup_mnemonic_nopin_nopassphrase()
|
||||
res = self.client.verify_message(
|
||||
'Bcash',
|
||||
'bitcoincash:qqj22md58nm09vpwsw82fyletkxkq36zxyxh322pru',
|
||||
unhexlify('209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
assert res is True
|
||||
|
||||
def test_verify_bitcoind(self):
|
||||
self.setup_mnemonic_nopin_nopassphrase()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user