28 lines
864 B
TypeScript
28 lines
864 B
TypeScript
|
|
// Copyright (C) 2026 Whiterun LLC,
|
||
|
|
// This software is licensed under the GNU Lesser General Public License (LGPL), version 3.0 or later.
|
||
|
|
// A copy of the license can be found in the LICENSE file or at https://www.gnu.org/licenses/lgpl-3.0.html
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Dapp-side PubkeyStateManager tests.
|
||
|
|
* Uses plain number child indices (0=Receive, 1=Change, 7=Cauldron)
|
||
|
|
* instead of DerivationPath enum.
|
||
|
|
*/
|
||
|
|
import { describe, it, expect, beforeEach } from "vitest";
|
||
|
|
import { DappPubkeyStateManager } from "./pubkey-state-manager.js";
|
||
|
|
|
||
|
|
const Receive = 0;
|
||
|
|
|
||
|
|
describe("DappPubkeyStateManager", () => {
|
||
|
|
let manager: DappPubkeyStateManager;
|
||
|
|
|
||
|
|
beforeEach(() => {
|
||
|
|
manager = new DappPubkeyStateManager();
|
||
|
|
});
|
||
|
|
|
||
|
|
describe("hasPath", () => {
|
||
|
|
it("should return false when no xpub node is set", () => {
|
||
|
|
expect(manager.hasPath(Receive)).toBe(false);
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|