Fix big amounts (#199)

* Fix wrong display of amounts >= 2^87

* Add test to check that amounts >= 2^87 make the app throw

* Bump v1.9.7 and update changelog
This commit is contained in:
Jean P
2021-10-04 11:26:01 +02:00
committed by GitHub
parent fb7204fb6c
commit 408805f751
5 changed files with 29 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
import "core-js/stable";
import "regenerator-runtime/runtime";
import { waitForAppScreen, zemu } from './test.fixture';
import { TransportStatusError } from "@ledgerhq/errors";
test('[Nano S] Transfer Ether on Ethereum app', zemu("nanos", async (sim, eth) => {
@@ -19,6 +20,16 @@ test('[Nano S] Transfer Ether on Ethereum app', zemu("nanos", async (sim, eth) =
});
}));
test('[Nano S] Transfer amount >= 2^87 Eth on Ethereum app should fail', zemu("nanos", async (sim, eth) => {
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f83f268e02cc9be5c53ea44bd43c289dcddc82520894dac17f958d2ee523a2206206994597c13d831ec7928db8b0861b8f7fe5df83cd553a829878000080018080',
);
await expect(tx).rejects.toEqual(new TransportStatusError(0x6807));
}));
test('[Nano S] Transfer Ether on network 5234 on Ethereum app', zemu("nanos", async (sim, eth) => {
const tx = eth.signTransaction(