From 7187701648cc2f4b8ea0abe292fb83ee3be9669f Mon Sep 17 00:00:00 2001 From: Davide Carpini Date: Tue, 10 Oct 2023 12:15:46 +0200 Subject: [PATCH] fix: dependencies --- libs/ledgerjs/packages/hw-app-vet/package.json | 13 +++++++++++-- .../packages/hw-app-vet/tests/Vechain.test.ts | 18 ++++++------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/libs/ledgerjs/packages/hw-app-vet/package.json b/libs/ledgerjs/packages/hw-app-vet/package.json index fbdf0957c52c..a51e400dd097 100644 --- a/libs/ledgerjs/packages/hw-app-vet/package.json +++ b/libs/ledgerjs/packages/hw-app-vet/package.json @@ -44,6 +44,15 @@ "test": "jest" }, "devDependencies": { - "typescript": "^4" - } + "@ledgerhq/hw-transport-mocker": "workspace:^", + "source-map-support": "^0.5.21", + "typescript": "^4", + "@types/jest": "^29.5.0", + "jest": "^28.1.1", + "ts-jest": "^28.0.5", + "@types/node": "^18.15.3", + "documentation": "13.2.5", + "ts-node": "^10.4.0" + }, + "gitHead": "dd0dea64b58e5a9125c8a422dcffd29e5ef6abec" } \ No newline at end of file diff --git a/libs/ledgerjs/packages/hw-app-vet/tests/Vechain.test.ts b/libs/ledgerjs/packages/hw-app-vet/tests/Vechain.test.ts index 537e61c9bac2..2ca4eaf8b26b 100644 --- a/libs/ledgerjs/packages/hw-app-vet/tests/Vechain.test.ts +++ b/libs/ledgerjs/packages/hw-app-vet/tests/Vechain.test.ts @@ -1,7 +1,4 @@ -import { - openTransportReplayer, - RecordStore, -} from "@ledgerhq/hw-transport-mocker"; +import { openTransportReplayer, RecordStore } from "@ledgerhq/hw-transport-mocker"; import Vet from "../src/Vet"; import { Transaction as ThorTransaction } from "thor-devkit"; @@ -10,7 +7,7 @@ test("getAppConfiguration", async () => { RecordStore.fromString(` => e006000000 <= 030100079000 - `) + `), ); const vet = new Vet(transport); const result = await vet.getAppConfiguration(); @@ -24,7 +21,7 @@ test("Get address", async () => { RecordStore.fromString(` => e002000015058000002c80000332800000000000000000000000 <= 410482c44bc99cdf08d4360c97fbf62d387288ab75c576926943ad90059002720e93f58799391393c98ad41136aa4ac871b103d25cb9a88f1aadd7dbbe3c7794888928333234373631393364346133323438383332326666426239383335613763463263376532323032439000 - `) + `), ); const vet = new Vet(transport); const { address } = await vet.getAddress("44'/818'/0'/0/0"); @@ -36,7 +33,7 @@ test("signMessage", async () => { RecordStore.fromString(` => e004000037058000002c80000332800000000000000000000000e1278012d8d7940000000000000000000000000000000000000000808080808080c0 <= dd0ad907f6cfdd068226999eee0d20789732905270a7c4ed385872599f40978e043a5d7a15e396e59e9c9e921be5f4e02e3b6284b8cf835443f4123ca20b5b35009000 - `) + `), ); const unsigned = new ThorTransaction({ @@ -57,12 +54,9 @@ test("signMessage", async () => { }); const vet = new Vet(transport); - const res = await vet.signTransaction( - "44'/818'/0'/0/0", - unsigned.encode().toString("hex") - ); + const res = await vet.signTransaction("44'/818'/0'/0/0", unsigned.encode().toString("hex")); expect(res.toString("hex")).toEqual( - "dd0ad907f6cfdd068226999eee0d20789732905270a7c4ed385872599f40978e043a5d7a15e396e59e9c9e921be5f4e02e3b6284b8cf835443f4123ca20b5b3500" + "dd0ad907f6cfdd068226999eee0d20789732905270a7c4ed385872599f40978e043a5d7a15e396e59e9c9e921be5f4e02e3b6284b8cf835443f4123ca20b5b3500", ); });