Skip to content

Commit

Permalink
Merge branch 'develop' into fix/aptos-bridge-mock
Browse files Browse the repository at this point in the history
  • Loading branch information
semeano committed Jan 9, 2025
2 parents 4c82b57 + 2b9a427 commit adc1f51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 0 additions & 10 deletions libs/ledger-live-common/src/families/aptos/LedgerAccount.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,15 @@ describe("LedgerAccount Test", () => {

it("builds the client properly", () => {
expect(LedgerAccount.fromLedgerConnection).toBeDefined();
expect(typeof LedgerAccount.fromLedgerConnection).toBe("function");
expect(account.init).toBeDefined();
expect(typeof account.init).toBe("function");
expect(account.toAptosAccount).toBeDefined();
expect(typeof account.toAptosAccount).toBe("function");
expect(account.hdWalletPath).toBeDefined();
expect(typeof account.hdWalletPath).toBe("function");
expect(account.address).toBeDefined();
expect(typeof account.address).toBe("function");
expect(account.authKey).toBeDefined();
expect(typeof account.authKey).toBe("function");
expect(account.pubKey).toBeDefined();
expect(typeof account.pubKey).toBe("function");
expect(account.asyncSignBuffer).toBeDefined();
expect(typeof account.asyncSignBuffer).toBe("function");
expect(account.asyncSignHexString).toBeDefined();
expect(typeof account.asyncSignHexString).toBe("function");
expect(account.signTransaction).toBeDefined();
expect(typeof account.signTransaction).toBe("function");

expect(mockedLedgerAccount).toHaveBeenCalledTimes(1);
});
Expand Down
9 changes: 8 additions & 1 deletion libs/ledger-live-common/src/families/aptos/bridge/js.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Aptos bridge interface ", () => {
});
});

describe("accountBridge ", () => {
describe("accountBridge", () => {
it("should contain all methods", () => {
expect(bridge.accountBridge.estimateMaxSpendable).toBeDefined();
expect(typeof bridge.accountBridge.estimateMaxSpendable).toBe("function");
Expand All @@ -53,8 +53,15 @@ describe("Aptos bridge interface ", () => {
expect(typeof bridge.accountBridge.signOperation).toBe("function");
expect(bridge.accountBridge.broadcast).toBeDefined();
expect(typeof bridge.accountBridge.broadcast).toBe("function");
expect(bridge.currencyBridge.hydrate).toBeDefined();
expect(typeof bridge.currencyBridge.hydrate).toBe("function");
expect(bridge.currencyBridge.preload).toBeDefined();
expect(typeof bridge.currencyBridge.preload).toBe("function");
expect(bridge.currencyBridge.scanAccounts).toBeDefined();
expect(typeof bridge.currencyBridge.scanAccounts).toBe("function");
});
});

describe("updateTransaction", () => {
it("should update the transaction with the given patch", () => {
const initialTransaction = {
Expand Down

0 comments on commit adc1f51

Please sign in to comment.