Updated eip1559 test
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 727 B After Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 550 B |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 365 B |
@@ -1,39 +1,30 @@
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
import { waitForAppScreen, zemu } from './test.fixture';
|
||||
import { waitForAppScreen, zemu, nano_models } from './test.fixture';
|
||||
|
||||
test('[Nano S] Transfer eip1559', zemu("nanos", async (sim, eth) => {
|
||||
nano_models.forEach(function(model) {
|
||||
test('[Nano ' + model.letter + '] Transfer eip1559', zemu(model, async (sim, eth) => {
|
||||
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/0'/0/0",
|
||||
'02f87001018502540be4008502540be40086246139ca800094cccccccccccccccccccccccccccccccccccccccc8000c001a0e07fb8a64ea3786c9a6649e54429e2786af3ea31c6d06165346678cf8ce44f9ba00e4a0526db1e905b7164a858fd5ebd2f1759e22e6955499448bd276a6aa62830',
|
||||
);
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/0'/0/0",
|
||||
'02f87001018502540be4008502540be40086246139ca800094cccccccccccccccccccccccccccccccccccccccc8000c001a0e07fb8a64ea3786c9a6649e54429e2786af3ea31c6d06165346678cf8ce44f9ba00e4a0526db1e905b7164a858fd5ebd2f1759e22e6955499448bd276a6aa62830',
|
||||
);
|
||||
|
||||
await waitForAppScreen(sim);
|
||||
await sim.navigateAndCompareSnapshots('.', 'nanos_transfer_eip1559', [6, 0]);
|
||||
await waitForAppScreen(sim);
|
||||
let clicks;
|
||||
if (model.letter === 'S') clicks = [7];
|
||||
else clicks = [5];
|
||||
// Go to the reject screen
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_eip1559', clicks);
|
||||
// Accepting the transaction somehow takes too long for Zemu and takes the same screenshot
|
||||
// twice, so accept it manually
|
||||
await sim.clickLeft();
|
||||
await sim.clickBoth();
|
||||
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "3d6dfabc6c52374bfa34cb2c433856a0bcd9484870dd1b50249f7164a5fce052",
|
||||
"s": "0548a774dd0b63930d83cb2e1a836fe3ef24444e8b758b00585d9a076c0e98a8",
|
||||
"v": "01"
|
||||
});
|
||||
|
||||
}));
|
||||
|
||||
test.skip('[Nano X] Transfer eip1559', zemu("nanox", async (sim, eth) => {
|
||||
|
||||
const tx = eth.signTransaction(
|
||||
"44'/60'/0'/0/0",
|
||||
'02f87001018502540be4008502540be40086246139ca800094cccccccccccccccccccccccccccccccccccccccc8000c001a0e07fb8a64ea3786c9a6649e54429e2786af3ea31c6d06165346678cf8ce44f9ba00e4a0526db1e905b7164a858fd5ebd2f1759e22e6955499448bd276a6aa62830',
|
||||
);
|
||||
|
||||
await waitForAppScreen(sim);
|
||||
await sim.navigateAndCompareSnapshots('.', 'nanox_transfer_eip1559', [4, 0]);
|
||||
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "3d6dfabc6c52374bfa34cb2c433856a0bcd9484870dd1b50249f7164a5fce052",
|
||||
"s": "0548a774dd0b63930d83cb2e1a836fe3ef24444e8b758b00585d9a076c0e98a8",
|
||||
"v": "01"
|
||||
});
|
||||
|
||||
}));
|
||||
await expect(tx).resolves.toEqual({
|
||||
"r": "3d6dfabc6c52374bfa34cb2c433856a0bcd9484870dd1b50249f7164a5fce052",
|
||||
"s": "0548a774dd0b63930d83cb2e1a836fe3ef24444e8b758b00585d9a076c0e98a8",
|
||||
"v": "01"
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||