Skip to content

Commit

Permalink
chore: add test cases to cover reported issue #166
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Oct 23, 2024
1 parent de3ee0e commit 3cf3314
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests_zemu/tests/standard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,4 +617,31 @@ describe('Standard', function () {
await sim.close();
}
});

// https://github.com/Zondax/ledger-filecoin/issues/166
test.concurrent.each(models)('Issue #166', async function (m) {
const sim = new Zemu(m.path);
try {
await sim.start({...defaultOptions, model: m.name,});
const app = new FilecoinApp(sim.getTransport());

const txBlob = Buffer.from(
"8A005502972DE5CB57E5208A9FEF1887B39B2BE0EBDA5FEE5501539A38D7116E30F44985EFF6E99A2D5FBADF951901401A044A58AB44000189DD44000185BF025901E88456040ADC451DCFCE6429224C835B09E60FFAD5EBBBC9F0401AE525AA155901C75901C4AC9650D800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004443AEEEB2000000000000000000000000FF00000000000000000000000000000000023319000000000000000000000000000000000000000000000000000000000000000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084F654B137000000000000000000000000FF000000000000000000000000000000000233190000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003E800000000000000000000000000000000000000000000000000000000",
"hex",
);

// // do not wait here..
const signatureRequest = app.sign(PATH, txBlob);
// // Wait until we are not in the main menu
await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot());
await sim.compareSnapshotsAndApprove(".", `${m.prefix.toLowerCase()}-issue-166`)

let resp = await signatureRequest;
console.log(resp);
expect(resp.return_code).toEqual(0x9000);
expect(resp.error_message).toEqual("No errors");
} finally {
await sim.close();
}
});
})

0 comments on commit 3cf3314

Please sign in to comment.