1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 17:38:39 +00:00

update to new ApplySettings order

This commit is contained in:
Pavol Rusnak 2016-11-22 22:02:50 +01:00
parent ad6a2160cc
commit 17435cf174
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
7 changed files with 15 additions and 10 deletions

View File

@ -11,8 +11,8 @@ class TestMsgApplysettings(common.TrezorTest):
self.assertEqual(self.client.features.label, 'test')
with self.client:
self.client.set_expected_responses([proto.ButtonRequest(),
proto.PinMatrixRequest(),
self.client.set_expected_responses([proto.PinMatrixRequest(),
proto.ButtonRequest(),
proto.Success(),
proto.Features()])
self.client.apply_settings(label='new label')
@ -24,8 +24,8 @@ class TestMsgApplysettings(common.TrezorTest):
self.assertEqual(self.client.features.language, 'english')
with self.client:
self.client.set_expected_responses([proto.ButtonRequest(),
proto.PinMatrixRequest(),
self.client.set_expected_responses([proto.PinMatrixRequest(),
proto.ButtonRequest(),
proto.Success(),
proto.Features()])
self.client.apply_settings(language='nonexistent')
@ -38,8 +38,8 @@ class TestMsgApplysettings(common.TrezorTest):
self.assertEqual(self.client.features.passphrase_protection, False)
with self.client:
self.client.set_expected_responses([proto.ButtonRequest(),
proto.PinMatrixRequest(),
self.client.set_expected_responses([proto.PinMatrixRequest(),
proto.ButtonRequest(),
proto.Success(),
proto.Features()])
self.client.apply_settings(use_passphrase=True)
@ -68,8 +68,8 @@ class TestMsgApplysettings(common.TrezorTest):
img = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"\x00\x00\x00\x00\x04\x80\x00\x00\x00\x00\x00\x00\x00\x00\x04\x88\x02\x00\x00\x00\x02\x91\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x90@\x00\x11@\x00\x00\x00\x00\x00\x00\x08\x00\x10\x92\x12\x04\x00\x00\x05\x12D\x00\x00\x00\x00\x00 \x00\x00\x08\x00Q\x00\x00\x02\xc0\x00\x00\x00\x00\x00\x00\x00\x10\x02 \x01\x04J\x00)$\x00\x00\x00\x00\x80\x00\x00\x00\x00\x08\x10\xa1\x00\x00\x02\x81 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\tP\x00\x00\x00\x00\x00\x00 \x00\x00\xa0\x00\xa0R \x12\x84\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x08\x00\tP\x00\x00\x00\x00 \x00\x04 \x00\x80\x02\x00@\x02T\xc2 \x00\x00\x00\x00\x00\x00\x00\x10@\x00)\t@\n\xa0\x80\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x80@\x14\xa9H\x04\x00\x00\x88@\x00\x00\x00\x00\x00\x02\x02$\x00\x15B@\x00\nP\x00\x00\x00\x00\x00\x80\x00\x00\x91\x01UP\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x02\x08@ Z\xa5 \x00\x00\x80\x00\x00\x00\x00\x00\x00\x08\xa1%\x14*\xa0\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00@\xaa\x91 \x00\x05E\x80\x00\x00\x00\x00\x00\x02*T\x05-D\x00\x00\x05 @\x00\x00\x00\x00\x00%@\x80\x11V\xa0\x88\x00\x05@\xb0\x00\x00\x00\x00\x00\x818$\x04\xabD \x00\x06\xa1T\x00\x00\x00\x00\x02\x03\xb8\x01R\xd5\x01\x00\x00\x05AP\x00\x00\x00\x00\x08\xadT\x00\x05j\xa4@\x00\x87ah\x00\x00\x00\x00\x02\x8d\xb8\x08\x00.\x01\x00\x00\x02\xa5\xa8\x10\x00\x00\x00*\xc1\xec \n\xaa\x88 \x02@\xf6\xd0\x02\x00\x00\x00\x0bB\xb6\x14@U"\x80\x00\x01{`\x00\x00\x00\x00M\xa3\xf8 \x15*\x00\x00\x00\x10n\xc0\x04\x00\x00\x02\x06\xc2\xa8)\x00\x96\x84\x80\x00\x00\x1b\x00\x00\x80@\x10\x87\xa7\xf0\x84\x10\xaa\x10\x00\x00D\x00\x00\x02 \x00\x8a\x06\xfa\xe0P\n-\x02@\x00\x12\x00\x00\x00\x00\x10@\x83\xdf\xa0\x00\x08\xaa@\x00\x00\x01H\x00\x05H\x04\x12\x01\xf7\x81P\x02T\t\x00\x00\x00 \x00\x00\x84\x10\x00\x00z\x00@)* \x00\x00\x01\n\xa0\x02 \x05\n\x00\x00\x05\x10\x84\xa8\x84\x80\x00\x00@\x14\x00\x92\x10\x80\x00\x04\x11@\tT\x00\x00\x00\x00\n@\x00\x08\x84@$\x00H\x00\x12Q\x02\x00\x00\x00\x00\x90\x02A\x12\xa8\n\xaa\x92\x10\x04\xa8\x10@\x00\x00\x04\x04\x00\x04I\x00\x04\x14H\x80"R\x01\x00\x00\x00!@\x00\x00$\xa0EB\x80\x08\x95hH\x00\x00\x00\x84\x10 \x05Z\x00\x00(\x00\x02\x00\xa1\x01\x00\x00\x04\x00@\x82\x00\xadH*\x92P\x00\xaaP\x00\x00\x00\x00\x11\x02\x01*\xad\x01\x00\x01\x01"\x11D\x08\x00\x00\x10\x80 \x00\x81W\x80J\x94\x04\x08\xa5 !\x00\x00\x00\x02\x00B*\xae\xa1\x00\x80\x10\x01\x08\xa4\x00\x00\x00\x00\x00\x84\x00\t[@"HA\x04E\x00\x84\x00\x00\x00\x10\x00\x01J\xd5\x82\x90\x02\x00!\x02\xa2\x00\x00\x00\x00\x00\x00\x00\x05~\xa0\x00 \x10\n)\x00\x11\x00\x00\x00\x00\x00\x00!U\x80\xa8\x88\x82\x80\x01\x00\x00\x00\x00\x00\x00H@\x11\xaa\xc0\x82\x00 *\n\x00\x00\x00\x00\x00\x00\x00\x00\n\xabb@ \x04\x00! \x84\x00\x00\x00\x00\x02@\xa5\x15A$\x04\x81(\n\x00\x00\x00\x00\x00\x00 \x01\x10\x02\xe0\x91\x02\x00\x00\x04\x00\x00\x00\x00\x00\x00\x01 \xa9\tQH@\x91 P\x00\x00\x00\x00\x00\x00\x08\x00\x00\xa0T\xa5\x00@\x80\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00 T\xa0\t\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00@\x02\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00*\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x10\x00\x00\x10\x02\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00@\x04\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x08@\x10\x00\x00\x00\x00'
with self.client:
self.client.set_expected_responses([proto.ButtonRequest(),
proto.PinMatrixRequest(),
self.client.set_expected_responses([proto.PinMatrixRequest(),
proto.ButtonRequest(),
proto.Success(),
proto.Features()])
self.client.apply_settings(homescreen=img)

View File

@ -16,8 +16,8 @@ class TestProtectionLevels(common.TrezorTest):
def test_apply_settings(self):
with self.client:
self.setup_mnemonic_pin_passphrase()
self.client.set_expected_responses([proto.ButtonRequest(),
proto.PinMatrixRequest(),
self.client.set_expected_responses([proto.PinMatrixRequest(),
proto.ButtonRequest(),
proto.Success(),
proto.Features()]) # TrezorClient reinitializes device
self.client.apply_settings(label='nazdar')

View File

@ -0,0 +1 @@
{"valueOut": 1.26511535, "vout": [{"spentIndex": 0, "spentHeight": 335022, "value": "1.26491535", "n": 0, "spentTxId": "79f47b5812eb8bcf13d4e60792129488ea237f86386468391d3ad3f8fdb3356e", "scriptPubKey": {"type": "pubkeyhash", "hex": "76a91495783804d28e528fbc4b48c7700471e6845804eb88ac", "addresses": ["1EdKhXv7zjGowPzgDQ4z1wa2ukVrXRXXkP"], "asm": "OP_DUP OP_HASH160 95783804d28e528fbc4b48c7700471e6845804eb OP_EQUALVERIFY OP_CHECKSIG"}}, {"spentIndex": 0, "spentHeight": 333744, "value": "0.00020000", "n": 1, "spentTxId": "dd320786d1f58c095be0509dc56b277b6de8f2fb5517f519c6e6708414e3300b", "scriptPubKey": {"type": "scripthash", "hex": "a914fb0670971091da8248b5c900c6515727a20e866287", "addresses": ["3QaKF8zobqcqY8aS6nxCD5ZYdiRfL3RCmU"], "asm": "OP_HASH160 fb0670971091da8248b5c900c6515727a20e8662 OP_EQUAL"}}], "blockhash": "0000000000000000149287bdefeecd34a7d0770ec5954f337c508bc07f980819", "valueIn": 1.26521535, "fees": 0.0001, "vin": [{"addr": "1AZjQHKxsUFQRR24qYTBAxMsQR9bgoRL4h", "vout": 0, "sequence": 4294967295, "doubleSpentTxID": null, "value": 1.26521535, "n": 0, "valueSat": 126521535, "txid": "55d079ca797fee81416b71b373abedd8722e33c9f73177be0166b5d5fdac478b", "scriptSig": {"hex": "483045022100d82e57d4d11d3b811d07f2fa4ded2fb8a3b7bb1d3e9f293433de5c0d1093c3bd02206704ccd2ff437e2f7716b5e9f2502a9cbb41f1245a18b2b10296980f1ae38253012102be9919a5ba373b1af58ad757db19e7c836116bb8138e0c6d99599e4db96568f4", "asm": "3045022100d82e57d4d11d3b811d07f2fa4ded2fb8a3b7bb1d3e9f293433de5c0d1093c3bd02206704ccd2ff437e2f7716b5e9f2502a9cbb41f1245a18b2b10296980f1ae38253[ALL] 02be9919a5ba373b1af58ad757db19e7c836116bb8138e0c6d99599e4db96568f4"}}], "txid": "6189e3febb5a21cee8b725aa1ef04ffce7e609448446d3a8d6f483c634ef5315", "blocktime": 1418229568, "version": 1, "confirmations": 106369, "time": 1418229568, "blockheight": 333738, "locktime": 0, "size": 224}

View File

@ -0,0 +1 @@
{"valueOut": 0.02262478, "vout": [{"spentIndex": null, "spentHeight": null, "value": "0.00100000", "n": 0, "spentTxId": null, "scriptPubKey": {"type": "scripthash", "hex": "a914fe5b12d8eb22356e3e071ba80dabdf7272c1898787", "addresses": ["3QsvfB6d1LzYcpm8xyhS1N1HBRrzHTgLHB"], "asm": "OP_HASH160 fe5b12d8eb22356e3e071ba80dabdf7272c18987 OP_EQUAL"}}, {"spentIndex": 0, "spentHeight": 335144, "value": "0.02162478", "n": 1, "spentTxId": "e4bc1ae5e5007a08f2b3926fe11c66612e8f73c6b00c69c7027213b84d259be3", "scriptPubKey": {"type": "pubkeyhash", "hex": "76a914c3ddd5e35f9bbecd7b10f47b5734dbfe40e331cb88ac", "addresses": ["1JreWorDp4fm2tqPR9ntUXApyXUZPR7LSP"], "asm": "OP_DUP OP_HASH160 c3ddd5e35f9bbecd7b10f47b5734dbfe40e331cb OP_EQUALVERIFY OP_CHECKSIG"}}], "blockhash": "000000000000000000f2c3875e9e7998fee70fe9d3961900230fafa55201d375", "valueIn": 0.02272478, "fees": 0.0001, "vin": [{"addr": "1QFYUD8963xdqEQ1PU64t8391t148qQtbS", "vout": 1, "sequence": 4294967295, "doubleSpentTxID": null, "value": 0.02272478, "n": 0, "valueSat": 2272478, "txid": "613f3a703d337c5a5a4413a5b2babc17cb32032fa7453074cabf38aa6151b4f8", "scriptSig": {"hex": "473044022030651976c4be2688bc0b8e39d8e6634940877bcda8825797b3537a868782758802202761b49920437e0e69d73ed551ba74376a17f4a71197ba02727cfdc3b83fbf3e012102b454b2a1251ec84780d59d18bd6e93be8bfac574ea817c55417940d44dea402b", "asm": "3044022030651976c4be2688bc0b8e39d8e6634940877bcda8825797b3537a868782758802202761b49920437e0e69d73ed551ba74376a17f4a71197ba02727cfdc3b83fbf3e[ALL] 02b454b2a1251ec84780d59d18bd6e93be8bfac574ea817c55417940d44dea402b"}}], "txid": "a6e2829d089cee47e481b1a753a53081b40738cc87e38f1d9b23ab57d9ad4396", "blocktime": 1419111217, "version": 1, "confirmations": 104963, "time": 1419111217, "blockheight": 335144, "locktime": 0, "size": 223}

View File

@ -0,0 +1 @@
{"valueOut": 0.0999, "vout": [{"spentIndex": 1, "spentHeight": 311327, "value": "0.09890000", "n": 0, "spentTxId": "e8d445189c4158fb01f19514015f85dccc09a680be969f7a26fe74aabbc989f7", "scriptPubKey": {"type": "pubkeyhash", "hex": "76a9146970a648bb72eedba08c2d72eb47b8b704bf5ae388ac", "addresses": ["1AcWuArjpaRJBSYM8LpLk7mgcpEMbGxUNz"], "asm": "OP_DUP OP_HASH160 6970a648bb72eedba08c2d72eb47b8b704bf5ae3 OP_EQUALVERIFY OP_CHECKSIG"}}, {"spentIndex": 0, "spentHeight": 332795, "value": "0.00100000", "n": 1, "spentTxId": "8382a2b2e3ec8788800c1d46d285dfa9dd4051edddd75982fad166b9273e5ac6", "scriptPubKey": {"type": "scripthash", "hex": "a91488376dc8232dbafd959cba5b370be6629506cb1c87", "addresses": ["3E7GDtuHqnqPmDgwH59pVC7AvySiSkbibz"], "asm": "OP_HASH160 88376dc8232dbafd959cba5b370be6629506cb1c OP_EQUAL"}}], "blockhash": "00000000000000000e72b8fdd326aed038bc1e9ed80cdaf2732d62cd10dd2c4d", "valueIn": 0.1, "fees": 0.0001, "vin": [{"addr": "1En8Z9ekdEzdu5gur5f1G9gowv42tbBaSD", "vout": 0, "sequence": 4294967295, "doubleSpentTxID": null, "value": 0.1, "n": 0, "valueSat": 10000000, "txid": "1f5512d3b04ce460e0855aa0e58a3e58656daea3f1abe3f8e7b9bf4bcf5b65f1", "scriptSig": {"hex": "4730440220644d26019da3fdeed5258ee625e96873c87a5ec1e36eac25447482b5a7fceacf02202b0ccf16e9907f7f18c38033452e0ca70e233f139dc23893f90a06228a7fd147012103a641ba46e07563a0231090a208a222a8e750bf119fb49f4086b0526dbdfb50b2", "asm": "30440220644d26019da3fdeed5258ee625e96873c87a5ec1e36eac25447482b5a7fceacf02202b0ccf16e9907f7f18c38033452e0ca70e233f139dc23893f90a06228a7fd147[ALL] 03a641ba46e07563a0231090a208a222a8e750bf119fb49f4086b0526dbdfb50b2"}}], "txid": "c6091adf4c0c23982a35899a6e58ae11e703eacd7954f588ed4b9cdefc4dba52", "blocktime": 1402947826, "version": 1, "confirmations": 133915, "time": 1402947826, "blockheight": 306192, "locktime": 0, "size": 223}

View File

@ -0,0 +1 @@
{"valueOut": 0.1877507, "vout": [{"spentIndex": null, "spentHeight": null, "value": "0.00100000", "n": 0, "spentTxId": null, "scriptPubKey": {"type": "scripthash", "hex": "a914a4efc33d43d7a8a0040182c76ab624ff862f50d287", "addresses": ["3Gj7y1FdTppx2JEDqYqAEZFnKCA4GRysKF"], "asm": "OP_HASH160 a4efc33d43d7a8a0040182c76ab624ff862f50d2 OP_EQUAL"}}, {"spentIndex": 0, "spentHeight": 337674, "value": "0.18675070", "n": 1, "spentTxId": "1956152a945836ca835a04c0fbdbb1257bc9c24756f42c77dd1ed3c3fe1a94ac", "scriptPubKey": {"type": "pubkeyhash", "hex": "76a914167b282e46a22588d2746831f3dce2c37f6e70da88ac", "addresses": ["133sQKJfa4h55cwa5RcPAh5fmFA1SrELGJ"], "asm": "OP_DUP OP_HASH160 167b282e46a22588d2746831f3dce2c37f6e70da OP_EQUALVERIFY OP_CHECKSIG"}}], "blockhash": "0000000000000000177e78336482934c0f6826510464c5405490db118300dfab", "valueIn": 0.1878507, "fees": 0.0001, "vin": [{"addr": "12rApVsmCUHnPESfL3ycgTaQY7M6QrmY7j", "vout": 0, "sequence": 4294967295, "doubleSpentTxID": null, "value": 0.1878507, "n": 0, "valueSat": 18785070, "txid": "da1bc7c339a850474186a5336f22575d0b3ff2e29d1f27a3cf58f3f1bcc85a07", "scriptSig": {"hex": "483045022100c19574a2ade5d9cdd7c6ed7647725ce01da86d1ec21400e357b0bc691245111d022048948a84f447465a7b184b34f2bc02ad33ea4de4e6894fcc10a5914b60f0fae00121037c6412ae0c9c1774431f01eedc7369d8bc94b77931126d1a3a6da2e51264aa94", "asm": "3045022100c19574a2ade5d9cdd7c6ed7647725ce01da86d1ec21400e357b0bc691245111d022048948a84f447465a7b184b34f2bc02ad33ea4de4e6894fcc10a5914b60f0fae0[ALL] 037c6412ae0c9c1774431f01eedc7369d8bc94b77931126d1a3a6da2e51264aa94"}}], "txid": "d1d08ea63255af4ad16b098e9885a252632086fa6be53301521d05253ce8a73d", "blocktime": 1419095500, "version": 1, "confirmations": 104986, "time": 1419095500, "blockheight": 335121, "locktime": 0, "size": 224}

View File

@ -0,0 +1 @@
{"valueOut": 0.02152478, "vout": [{"spentIndex": 0, "spentHeight": 338362, "value": "0.02052478", "n": 0, "spentTxId": "e8e0b3b3a10a5f7914abc7b6a0e6e6e35ec8944a81bb279701d5ce22c794d8fc", "scriptPubKey": {"type": "pubkeyhash", "hex": "76a914e6271f1394b1e25d976d0957cb2b36aeb1d875c588ac", "addresses": ["1MywHKjaict4ceqJ2SS414FtyfSgPDamn9"], "asm": "OP_DUP OP_HASH160 e6271f1394b1e25d976d0957cb2b36aeb1d875c5 OP_EQUALVERIFY OP_CHECKSIG"}}, {"spentIndex": null, "spentHeight": null, "value": "0.00100000", "n": 1, "spentTxId": null, "scriptPubKey": {"type": "scripthash", "hex": "a9143e03a6446f27e2a0c1366b375a275c758e21edfa87", "addresses": ["37LvC1Q5CyKbMbKMncEJdXxqGhHxrBEgPE"], "asm": "OP_HASH160 3e03a6446f27e2a0c1366b375a275c758e21edfa OP_EQUAL"}}], "blockhash": "000000000000000000f2c3875e9e7998fee70fe9d3961900230fafa55201d375", "valueIn": 0.02162478, "fees": 0.0001, "vin": [{"addr": "1JreWorDp4fm2tqPR9ntUXApyXUZPR7LSP", "vout": 1, "sequence": 4294967295, "doubleSpentTxID": null, "value": 0.02162478, "n": 0, "valueSat": 2162478, "txid": "a6e2829d089cee47e481b1a753a53081b40738cc87e38f1d9b23ab57d9ad4396", "scriptSig": {"hex": "4730440220459b77130819bd451b6891b6827634be9f94af3bfbbe680e59946f5ca859b59e02200303a37f51561ad9329f9f37c8697d17c5095ec8b5c87957346c01f5477b1471012103df580a4d02976ed91802974312073ce8168adefb2a3162716d08eca059a72401", "asm": "30440220459b77130819bd451b6891b6827634be9f94af3bfbbe680e59946f5ca859b59e02200303a37f51561ad9329f9f37c8697d17c5095ec8b5c87957346c01f5477b1471[ALL] 03df580a4d02976ed91802974312073ce8168adefb2a3162716d08eca059a72401"}}], "txid": "e4bc1ae5e5007a08f2b3926fe11c66612e8f73c6b00c69c7027213b84d259be3", "blocktime": 1419111217, "version": 1, "confirmations": 104963, "time": 1419111217, "blockheight": 335144, "locktime": 0, "size": 223}