Port 'chainid.test' from 'zemu' to 'ragger'
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 349 B |
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 396 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 349 B |
1
tests/ragger/snapshots/nanosp/test_legacy_chainid1
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_legacy_chainid1
|
||||
1
tests/ragger/snapshots/nanosp/test_legacy_chainid2
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_legacy_chainid2
|
||||
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_chainid1/00001.png
Normal file
|
After Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 424 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_chainid1/00004.png
Normal file
|
After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_chainid1/00006.png
Normal file
|
After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_chainid2/00004.png
Normal file
|
After Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_chainid2/00006.png
Normal file
|
After Width: | Height: | Size: 381 B |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid1/00000.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid1/00001.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid1/00002.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid1/00003.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid1/00004.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid2/00000.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid2/00001.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid2/00002.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid2/00003.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_chainid2/00004.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
@@ -169,6 +169,37 @@ def test_legacy_send_bsc(firmware: Firmware,
|
||||
common(firmware, backend, navigator, tx_params, test_name, BIP32_PATH2)
|
||||
|
||||
|
||||
# Legacy Zemu ChainId: Transfer on network 112233445566 on Ethereum
|
||||
def test_legacy_chainid1(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
tx_params: dict = {
|
||||
"nonce": NONCE2,
|
||||
"gasPrice": Web3.to_wei(GAS_PRICE, 'gwei'),
|
||||
"gas": GAS_LIMIT,
|
||||
"to": ADDR2,
|
||||
"value": 31415926913374232,
|
||||
"chainId": 112233445566
|
||||
}
|
||||
common(firmware, backend, navigator, tx_params, test_name, BIP32_PATH2)
|
||||
|
||||
|
||||
# Legacy Zemu ChainId: Transfer on palm network on Ethereum
|
||||
def test_legacy_chainid2(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
tx_params: dict = {
|
||||
"nonce": NONCE2,
|
||||
"gasPrice": Web3.to_wei(GAS_PRICE, 'gwei'),
|
||||
"gas": GAS_LIMIT,
|
||||
"to": ADDR2,
|
||||
"value": 31415926913374232,
|
||||
"chainId": 11297108109
|
||||
}
|
||||
common(firmware, backend, navigator, tx_params, test_name, BIP32_PATH2)
|
||||
|
||||
|
||||
def test_1559(firmware: Firmware, backend: BackendInterface, navigator: Navigator):
|
||||
tx_params: dict = {
|
||||
|
||||
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 340 B |
@@ -1 +0,0 @@
|
||||
00009.png
|
||||
|
Before Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 365 B |
@@ -1 +0,0 @@
|
||||
00005.png
|
||||
|
Before Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 365 B |
@@ -1 +0,0 @@
|
||||
00005.png
|
||||
|
Before Width: | Height: | Size: 382 B |
@@ -1,47 +0,0 @@
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
import { waitForAppScreen, zemu, nano_models } from './test.fixture';
|
||||
|
||||
nano_models.forEach(function(model) {
|
||||
test('[Nano ' + model.letter + '] Transfer on network 112233445566 on Ethereum', zemu(model, async (sim, eth) => {
|
||||
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/1'/0/0",
|
||||
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf6181880851a21a278be8080',
|
||||
);
|
||||
|
||||
await waitForAppScreen(sim);
|
||||
let clicks;
|
||||
if (model.letter === 'S') clicks = 10;
|
||||
else clicks = 6;
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_112233445566_network', [clicks, -1, 0]);
|
||||
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "509981d8dfb66757e25ff47c009b9b5bc5db0f169473e4735f5212b144f1c069",
|
||||
"s": "5db989d81025de3c846e41a9ce01a3f9fd0982e2d827f1b88ffc95d73a48d04c",
|
||||
"v": "344344f19f",
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
nano_models.forEach(function(model) {
|
||||
test('[Nano ' + model.letter + '] Transfer on palm network on Ethereum', zemu(model, async (sim, eth) => {
|
||||
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/1'/0/0",
|
||||
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf61818808502a15c308d8080',
|
||||
);
|
||||
|
||||
await waitForAppScreen(sim);
|
||||
let clicks;
|
||||
if (model.letter === 'S') clicks = 10;
|
||||
else clicks = 6;
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_palm_network', [clicks, -1, 0]);
|
||||
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "946700c4972b3da24ddaa95e590ad25a8f905da62e2bd053285a4cc17f93f490",
|
||||
"s": "3698e84564e58477a49f7a9cea572ef5d672a5538db08f3ee42df5eb75a1b907",
|
||||
"v": "0542b8613d",
|
||||
});
|
||||
}));
|
||||
});
|
||||