Update tests
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 358 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 358 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 451 B |
|
Before Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 385 B |
|
Before Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 472 B |
@@ -83,90 +83,6 @@ def test_sign_simple(cmd):
|
||||
assert v == 0x26 # 38
|
||||
assert r.hex() == "6f389d15320f0501383526ed03de917c14212716f09a262dbc98431086a5db49"
|
||||
assert s.hex() == "0dc994b7b97230bb35fdf6fec2f4d8ff4cfb8bfeb2a652c364c738ff033c05dd"
|
||||
|
||||
|
||||
def test_sign_dai_coin_type_on_network_5234(cmd):
|
||||
result: list = []
|
||||
|
||||
# DAI coin type
|
||||
bip32_path="44'/700'/1'/0/0"
|
||||
|
||||
transaction = Transaction(
|
||||
txType=0xEB,
|
||||
nonce=0,
|
||||
gasPrice=0x0306dc4200,
|
||||
gasLimit=0x5208,
|
||||
to="0x5a321744667052affa8386ed49e00ef223cbffc3",
|
||||
value=0x6f9c9e7bf61818,
|
||||
chainID=5243,
|
||||
)
|
||||
|
||||
with cmd.simple_sign_tx(bip32_path=bip32_path, transaction=transaction, result=result) as ex:
|
||||
sleep(0.5)
|
||||
|
||||
if cmd.model == "nanos":
|
||||
# Review transaction
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Amount 1/3, 2/3, 3/3
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00003.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Address 1/3, 2/3, 3/3
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00004.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00005.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00006.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Network 5243
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00007.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Max Fees
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00008.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Accept and send
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00009.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
if cmd.model == "nanox" or cmd.model == "nanosp":
|
||||
# Review transaction
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Amount
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Address
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Network 5243
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00003.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Max Fees
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00004.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Accept and send
|
||||
compare_screenshot(cmd, f"screenshots/sign/{PATH_IMG[cmd.model]}/dai_coin_type_on_network_5234/00005.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
v, r, s = result
|
||||
|
||||
assert v == 0x1A # 26
|
||||
assert r.hex() == "7ebfa5d5cac1e16bb1f1a8c67706b5c6019c0f198df6bb44e742a9de72330961"
|
||||
assert s.hex() == "537419d8d1443d38ea87943c110789decb43b8f4fea8fae256fe842f669da634"
|
||||
|
||||
|
||||
def test_sign_reject(cmd):
|
||||
|
||||
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 359 B |
@@ -1 +0,0 @@
|
||||
00013.png
|
||||
|
Before Width: | Height: | Size: 9 B After Width: | Height: | Size: 414 B |
BIN
tests/zemu/snapshots/nanos_starkware_usdt_deposit/00015.png
Normal file
|
Before Width: | Height: | Size: 9 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 360 B |
@@ -1 +0,0 @@
|
||||
00009.png
|
||||
|
Before Width: | Height: | Size: 9 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 9 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 451 B |
|
Before Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 340 B |
@@ -1 +0,0 @@
|
||||
00009.png
|
||||
|
Before Width: | Height: | Size: 349 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 390 B |
|
Before Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 365 B |
@@ -1 +0,0 @@
|
||||
00005.png
|
||||
|
Before Width: | Height: | Size: 382 B |
@@ -36,25 +36,3 @@ nano_models.forEach(function(model) {
|
||||
await expect(tx).rejects.toEqual(new TransportStatusError(0x6807));
|
||||
}));
|
||||
});
|
||||
|
||||
nano_models.forEach(function(model) {
|
||||
test('[Nano ' + model.letter + '] Transfer Ether on network 5234 on Ethereum app', zemu(model, async (sim, eth) => {
|
||||
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/1'/0/0",
|
||||
'ED44850306DC4200825208945A321744667052AFFA8386ED49E00EF223CBFFC3876F9C9E7BF61818808214728080',
|
||||
);
|
||||
|
||||
await waitForAppScreen(sim);
|
||||
let clicks;
|
||||
if (model.letter === 'S') clicks = 10;
|
||||
else clicks = 6;
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_ethereum_5234_network', [clicks, -1, 0]);
|
||||
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "07a7982dfd16360c96a03467877d0cf9c36f799deff4dace250cdb18e28a3b90",
|
||||
"s": "773318a93da2e32c1cf308ddd6add1e8c0d285973e541520a05fb4dc720e4fb1",
|
||||
"v": "2908",
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||