1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

tests: uncomment ripple test

Some ripple tests stayed commented out accidentally. Shame on me.
This commit is contained in:
Tomas Susanka 2019-01-09 15:00:40 +01:00
parent c5b1948b64
commit 701b603419

View File

@ -28,48 +28,48 @@ class TestMsgRippleSignTx(TrezorTest):
def test_ripple_sign_simple_tx(self): def test_ripple_sign_simple_tx(self):
self.setup_mnemonic_allallall() self.setup_mnemonic_allallall()
# msg = ripple.create_sign_tx_msg( msg = ripple.create_sign_tx_msg(
# { {
# "TransactionType": "Payment", "TransactionType": "Payment",
# "Payment": { "Payment": {
# "Amount": 100000000, "Amount": 100000000,
# "Destination": "rBKz5MC2iXdoS3XgnNSYmF69K1Yo4NS3Ws", "Destination": "rBKz5MC2iXdoS3XgnNSYmF69K1Yo4NS3Ws",
# }, },
# "Flags": 0x80000000, "Flags": 0x80000000,
# "Fee": 100000, "Fee": 100000,
# "Sequence": 25, "Sequence": 25,
# } }
# ) )
# resp = ripple.sign_tx(self.client, parse_path("m/44'/144'/0'/0/0"), msg) resp = ripple.sign_tx(self.client, parse_path("m/44'/144'/0'/0/0"), msg)
# assert ( assert (
# resp.signature.hex() resp.signature.hex()
# == "3045022100e243ef623675eeeb95965c35c3e06d63a9fc68bb37e17dc87af9c0af83ec057e02206ca8aa5eaab8396397aef6d38d25710441faf7c79d292ee1d627df15ad9346c0" == "3045022100e243ef623675eeeb95965c35c3e06d63a9fc68bb37e17dc87af9c0af83ec057e02206ca8aa5eaab8396397aef6d38d25710441faf7c79d292ee1d627df15ad9346c0"
# ) )
# assert ( assert (
# resp.serialized_tx.hex() resp.serialized_tx.hex()
# == "12000022800000002400000019614000000005f5e1006840000000000186a0732102131facd1eab748d6cddc492f54b04e8c35658894f4add2232ebc5afe7521dbe474473045022100e243ef623675eeeb95965c35c3e06d63a9fc68bb37e17dc87af9c0af83ec057e02206ca8aa5eaab8396397aef6d38d25710441faf7c79d292ee1d627df15ad9346c081148fb40e1ffa5d557ce9851a535af94965e0dd098883147148ebebf7304ccdf1676fefcf9734cf1e780826" == "12000022800000002400000019614000000005f5e1006840000000000186a0732102131facd1eab748d6cddc492f54b04e8c35658894f4add2232ebc5afe7521dbe474473045022100e243ef623675eeeb95965c35c3e06d63a9fc68bb37e17dc87af9c0af83ec057e02206ca8aa5eaab8396397aef6d38d25710441faf7c79d292ee1d627df15ad9346c081148fb40e1ffa5d557ce9851a535af94965e0dd098883147148ebebf7304ccdf1676fefcf9734cf1e780826"
# ) )
#
# msg = ripple.create_sign_tx_msg( msg = ripple.create_sign_tx_msg(
# { {
# "TransactionType": "Payment", "TransactionType": "Payment",
# "Payment": { "Payment": {
# "Amount": 1, "Amount": 1,
# "Destination": "rNaqKtKrMSwpwZSzRckPf7S96DkimjkF4H", "Destination": "rNaqKtKrMSwpwZSzRckPf7S96DkimjkF4H",
# }, },
# "Fee": 10, "Fee": 10,
# "Sequence": 1, "Sequence": 1,
# } }
# ) )
# resp = ripple.sign_tx(self.client, parse_path("m/44'/144'/0'/0/2"), msg) resp = ripple.sign_tx(self.client, parse_path("m/44'/144'/0'/0/2"), msg)
# assert ( assert (
# resp.signature.hex() resp.signature.hex()
# == "3044022069900e6e578997fad5189981b74b16badc7ba8b9f1052694033fa2779113ddc002206c8006ada310edf099fb22c0c12073550c8fc73247b236a974c5f1144831dd5f" == "3044022069900e6e578997fad5189981b74b16badc7ba8b9f1052694033fa2779113ddc002206c8006ada310edf099fb22c0c12073550c8fc73247b236a974c5f1144831dd5f"
# ) )
# assert ( assert (
# resp.serialized_tx.hex() resp.serialized_tx.hex()
# == "1200002280000000240000000161400000000000000168400000000000000a732103dbed1e77cb91a005e2ec71afbccce5444c9be58276665a3859040f692de8fed274463044022069900e6e578997fad5189981b74b16badc7ba8b9f1052694033fa2779113ddc002206c8006ada310edf099fb22c0c12073550c8fc73247b236a974c5f1144831dd5f8114bdf86f3ae715ba346b7772ea0e133f48828b766483148fb40e1ffa5d557ce9851a535af94965e0dd0988" == "1200002280000000240000000161400000000000000168400000000000000a732103dbed1e77cb91a005e2ec71afbccce5444c9be58276665a3859040f692de8fed274463044022069900e6e578997fad5189981b74b16badc7ba8b9f1052694033fa2779113ddc002206c8006ada310edf099fb22c0c12073550c8fc73247b236a974c5f1144831dd5f8114bdf86f3ae715ba346b7772ea0e133f48828b766483148fb40e1ffa5d557ce9851a535af94965e0dd0988"
# ) )
msg = ripple.create_sign_tx_msg( msg = ripple.create_sign_tx_msg(
{ {