From 1b21cdea7489f9ee6bed59b7aeba0232fbb8a296 Mon Sep 17 00:00:00 2001 From: Pedro Semeano Date: Wed, 8 Jan 2025 15:08:41 +0000 Subject: [PATCH] chore: rollback changes --- .../src/families/aptos/api/index.test.ts | 12 ++++++++++++ .../src/families/aptos/bridge/js.test.ts | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/libs/ledger-live-common/src/families/aptos/api/index.test.ts b/libs/ledger-live-common/src/families/aptos/api/index.test.ts index 9ad1866bd06d..eff5afc25973 100644 --- a/libs/ledger-live-common/src/families/aptos/api/index.test.ts +++ b/libs/ledger-live-common/src/families/aptos/api/index.test.ts @@ -36,22 +36,34 @@ describe("Aptos API", () => { const api = new AptosAPI("aptos"); expect(api.broadcast).toBeDefined(); + expect(typeof api.broadcast).toBe("function"); expect(api.estimateGasPrice).toBeDefined(); + expect(typeof api.estimateGasPrice).toBe("function"); expect(api.generateTransaction).toBeDefined(); + expect(typeof api.generateTransaction).toBe("function"); expect(api.getAccount).toBeDefined(); + expect(typeof api.getAccount).toBe("function"); expect(api.getAccountInfo).toBeDefined(); + expect(typeof api.getAccountInfo).toBe("function"); expect(api.simulateTransaction).toBeDefined(); + expect(typeof api.simulateTransaction).toBe("function"); }); it("builds the client properly for testnet", () => { const api = new AptosAPI("aptos_testnet"); expect(api.broadcast).toBeDefined(); + expect(typeof api.broadcast).toBe("function"); expect(api.estimateGasPrice).toBeDefined(); + expect(typeof api.estimateGasPrice).toBe("function"); expect(api.generateTransaction).toBeDefined(); + expect(typeof api.generateTransaction).toBe("function"); expect(api.getAccount).toBeDefined(); + expect(typeof api.getAccount).toBe("function"); expect(api.getAccountInfo).toBeDefined(); + expect(typeof api.getAccountInfo).toBe("function"); expect(api.simulateTransaction).toBeDefined(); + expect(typeof api.simulateTransaction).toBe("function"); }); describe("getAccount", () => { diff --git a/libs/ledger-live-common/src/families/aptos/bridge/js.test.ts b/libs/ledger-live-common/src/families/aptos/bridge/js.test.ts index 9539a9e01333..eb6a875be90b 100644 --- a/libs/ledger-live-common/src/families/aptos/bridge/js.test.ts +++ b/libs/ledger-live-common/src/families/aptos/bridge/js.test.ts @@ -34,16 +34,26 @@ describe("Aptos bridge interface ", () => { describe("accountBridge ", () => { it("should contain all methods", () => { expect(bridge.accountBridge.estimateMaxSpendable).toBeDefined(); + expect(typeof bridge.accountBridge.estimateMaxSpendable).toBe("function"); expect(bridge.accountBridge.createTransaction).toBeDefined(); + expect(typeof bridge.accountBridge.createTransaction).toBe("function"); expect(bridge.accountBridge.updateTransaction).toBeDefined(); + expect(typeof bridge.accountBridge.updateTransaction).toBe("function"); expect(bridge.accountBridge.getTransactionStatus).toBeDefined(); + expect(typeof bridge.accountBridge.getTransactionStatus).toBe("function"); expect(bridge.accountBridge.prepareTransaction).toBeDefined(); + expect(typeof bridge.accountBridge.prepareTransaction).toBe("function"); expect(bridge.accountBridge.sync).toBeDefined(); + expect(typeof bridge.accountBridge.sync).toBe("function"); expect(bridge.accountBridge.receive).toBeDefined(); + expect(typeof bridge.accountBridge.receive).toBe("function"); expect(bridge.accountBridge.signOperation).toBeDefined(); + expect(typeof bridge.accountBridge.signOperation).toBe("function"); expect(bridge.accountBridge.broadcast).toBeDefined(); + expect(typeof bridge.accountBridge.broadcast).toBe("function"); }); }); + describe("updateTransaction", () => { it("should update the transaction with the given patch", () => { const initialTransaction = {