This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add
test_sign_wrong_pubkey_transfer
- Loading branch information
dj8yf0μl
committed
Feb 19, 2024
1 parent
f90e0cf
commit a99ee72
Showing
53 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+331 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+510 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+523 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+532 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+516 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+509 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+532 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+510 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+497 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+330 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+322 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+381 Bytes
...apshots/nanos/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+390 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+570 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+576 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+576 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+390 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+597 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+581 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+595 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+429 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+297 Bytes
tests/snapshots/nanos/test_sign_wrong_pubkey_transfer/0_1_error_bang/00009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+353 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+877 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+557 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+887 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00003.png
Oops, something went wrong.
Binary file added
BIN
+542 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00004.png
Oops, something went wrong.
Binary file added
BIN
+351 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00005.png
Oops, something went wrong.
Binary file added
BIN
+347 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00006.png
Oops, something went wrong.
Binary file added
BIN
+408 Bytes
...pshots/nanosp/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00007.png
Oops, something went wrong.
Binary file added
BIN
+416 Bytes
tests/snapshots/nanosp/test_sign_wrong_pubkey_transfer/0_1_error_bang/00000.png
Oops, something went wrong.
Binary file added
BIN
+1008 Bytes
tests/snapshots/nanosp/test_sign_wrong_pubkey_transfer/0_1_error_bang/00001.png
Oops, something went wrong.
Binary file added
BIN
+432 Bytes
tests/snapshots/nanosp/test_sign_wrong_pubkey_transfer/0_1_error_bang/00002.png
Oops, something went wrong.
Binary file added
BIN
+1020 Bytes
tests/snapshots/nanosp/test_sign_wrong_pubkey_transfer/0_1_error_bang/00003.png
Oops, something went wrong.
Binary file added
BIN
+455 Bytes
tests/snapshots/nanosp/test_sign_wrong_pubkey_transfer/0_1_error_bang/00004.png
Oops, something went wrong.
Binary file added
BIN
+318 Bytes
tests/snapshots/nanosp/test_sign_wrong_pubkey_transfer/0_1_error_bang/00005.png
Oops, something went wrong.
Binary file added
BIN
+353 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00000.png
Oops, something went wrong.
Binary file added
BIN
+877 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00001.png
Oops, something went wrong.
Binary file added
BIN
+557 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00002.png
Oops, something went wrong.
Binary file added
BIN
+887 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00003.png
Oops, something went wrong.
Binary file added
BIN
+542 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00004.png
Oops, something went wrong.
Binary file added
BIN
+351 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00005.png
Oops, something went wrong.
Binary file added
BIN
+347 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00006.png
Oops, something went wrong.
Binary file added
BIN
+408 Bytes
...apshots/nanox/test_sign_wrong_pubkey_transfer/0_0_continue_to_actions/00007.png
Oops, something went wrong.
Binary file added
BIN
+416 Bytes
tests/snapshots/nanox/test_sign_wrong_pubkey_transfer/0_1_error_bang/00000.png
Oops, something went wrong.
Binary file added
BIN
+1008 Bytes
tests/snapshots/nanox/test_sign_wrong_pubkey_transfer/0_1_error_bang/00001.png
Oops, something went wrong.
Binary file added
BIN
+432 Bytes
tests/snapshots/nanox/test_sign_wrong_pubkey_transfer/0_1_error_bang/00002.png
Oops, something went wrong.
Binary file added
BIN
+1020 Bytes
tests/snapshots/nanox/test_sign_wrong_pubkey_transfer/0_1_error_bang/00003.png
Oops, something went wrong.
Binary file added
BIN
+455 Bytes
tests/snapshots/nanox/test_sign_wrong_pubkey_transfer/0_1_error_bang/00004.png
Oops, something went wrong.
Binary file added
BIN
+318 Bytes
tests/snapshots/nanox/test_sign_wrong_pubkey_transfer/0_1_error_bang/00005.png
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from application_client.client import ( | ||
AsyncAPDU, | ||
SW_OK, | ||
NavigableConditions, | ||
Nearbackend, | ||
FINISH_STUB_APDU, | ||
generic_test_sign, | ||
) | ||
from ragger.backend.interface import RAPDU | ||
from ragger.backend import RaisePolicy | ||
from ragger.navigator import Navigator | ||
|
||
|
||
def test_sign_wrong_pubkey_transfer(firmware, backend, navigator: Navigator, test_name): | ||
""" | ||
Transaction { | ||
signer_id: AccountId( | ||
"1b11b3b31673033936ad07bddc01f9da27d974811e480fb197c799e23480a489", | ||
), | ||
public_key: ed25519:2pffV8fXgXUyuKdTS8Nqnvbkua16wEtTv8tdWZCpVtat, | ||
nonce: 103595482000005, | ||
receiver_id: AccountId( | ||
"dc7e34eecec3096a4a661e10932834f801149c49dba9b93322f6d9de18047f9c", | ||
), | ||
block_hash: Cb3vKNiF3MUuVoqfjuEFCgSNPT79pbuVfXXd2RxDXc5E, | ||
actions: [ | ||
Transfer( | ||
TransferAction { | ||
deposit: 150000000000000000000000, | ||
}, | ||
), | ||
], | ||
} | ||
""" | ||
backend.raise_policy = RaisePolicy.RAISE_NOTHING | ||
client = Nearbackend(backend) | ||
chunks = [ | ||
AsyncAPDU( | ||
data=bytes.fromhex( | ||
"80028057fa8000002c8000018d8000000080000000800000014000000031623131623362333136373330333339333661643037626464633031663964613237643937343831316534383066623139376337393965323334383061343839001b11b3b31673033936ad07bddc01f9da27d974811e480fb197c799e23480a48985aae733385e00004000000064633765333465656365633330393661346136363165313039333238333466383031313439633439646261396239333332326636643964653138303437663963ac299ac1376e375cd39338d8b29225613ef947424b74a3207c1226863a72583101000000030000c071f0d12b84c31f000000000000" | ||
), | ||
navigable_conditions=NavigableConditions( | ||
value=["Continue to actions", "Error!"], | ||
), | ||
expected_response=RAPDU( | ||
0xB00D, | ||
bytes(), | ||
), | ||
) | ||
] | ||
generic_test_sign(client, chunks, navigator, test_name) |