Port 'send_bsc.test' from 'zemu' to 'ragger'
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 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: 323 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 377 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_send_bsc
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_legacy_send_bsc
|
||||
|
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: 373 B After Width: | Height: | Size: 373 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_send_bsc/00004.png
Normal file
|
After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 472 B |
BIN
tests/ragger/snapshots/nanox/test_legacy_send_bsc/00006.png
Normal file
|
After Width: | Height: | Size: 381 B |
BIN
tests/ragger/snapshots/stax/test_legacy_send_bsc/00000.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_send_bsc/00001.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_send_bsc/00002.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_send_bsc/00003.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
tests/ragger/snapshots/stax/test_legacy_send_bsc/00004.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
@@ -126,9 +126,9 @@ def test_legacy(firmware: Firmware, backend: BackendInterface, navigator: Naviga
|
||||
|
||||
# Legacy Zemu Send: Transfer Ether on Ethereum app
|
||||
def test_legacy_send(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
tx_params: dict = {
|
||||
"nonce": NONCE2,
|
||||
"gasPrice": Web3.to_wei(GAS_PRICE, "gwei"),
|
||||
@@ -153,6 +153,22 @@ def test_legacy_send_error(backend: BackendInterface):
|
||||
common_fail(backend, tx_params, StatusWord.EXCEPTION_OVERFLOW, path=BIP32_PATH2)
|
||||
|
||||
|
||||
# Legacy Zemu Send BSC: Transfer bsc
|
||||
def test_legacy_send_bsc(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
tx_params: dict = {
|
||||
"nonce": 1,
|
||||
"gasPrice": Web3.to_wei(5, 'gwei'),
|
||||
"gas": GAS_LIMIT,
|
||||
"to": ADDR2,
|
||||
"value": 31415926913374232,
|
||||
"chainId": 56
|
||||
}
|
||||
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 |
@@ -1 +0,0 @@
|
||||
00009.png
|
||||
|
Before Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 365 B |
@@ -1 +0,0 @@
|
||||
00005.png
|
||||
|
Before Width: | Height: | Size: 382 B |
@@ -1,25 +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 bsc', zemu(model, async (sim, eth) => {
|
||||
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/1'/0/0",
|
||||
'EB0185012A05F200825208945A321744667052AFFA8386ED49E00EF223CBFFC3876F9C9E7BF6181880388080',
|
||||
);
|
||||
|
||||
await waitForAppScreen(sim);
|
||||
let clicks;
|
||||
if (model.letter === 'S') clicks = 10;
|
||||
else clicks = 6;
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_bsc', [clicks, -1, 0]);
|
||||
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "f667cc34e9815df4f052fb3463cdbe355fff5c1acf4e919b3539806521a059ad",
|
||||
"s": "6b35492b7108d9d9e1cc7aede536ed6b3173197b56dd873cbc3b43e041d6f407",
|
||||
"v": "93",
|
||||
});
|
||||
}));
|
||||
});
|
||||