From: Chris Duncan Date: Mon, 7 Jul 2025 17:58:31 +0000 (-0700) Subject: Move class variables to top of class definition. X-Git-Tag: v0.10.5~87 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=b61a7e001ceb4aa980ae0404ef65c61f4d0dbd33;p=libnemo.git Move class variables to top of class definition. --- diff --git a/src/lib/wallets/ledger-wallet.ts b/src/lib/wallets/ledger-wallet.ts index afb6881..0dd4f1f 100644 --- a/src/lib/wallets/ledger-wallet.ts +++ b/src/lib/wallets/ledger-wallet.ts @@ -46,6 +46,13 @@ interface LedgerSignResponse extends LedgerResponse { export class LedgerWallet extends Wallet { static #isInternal: boolean = false + #status: 'DISCONNECTED' | 'LOCKED' | 'BUSY' | 'CONNECTED' = 'DISCONNECTED' + get status () { return this.#status } + openTimeout: 3000 = 3000 + listenTimeout: 30000 = 30000 + transport: Transport | null = null + DynamicTransport: typeof TransportBLE | typeof TransportUSB | typeof TransportHID = TransportHID + constructor (id: Entropy) { if (!LedgerWallet.#isInternal) { throw new Error(`LedgerWallet cannot be instantiated directly. Use 'await LedgerWallet.create()' instead.`) @@ -110,13 +117,6 @@ export class LedgerWallet extends Wallet { return result === 'OK' } - #status: 'DISCONNECTED' | 'LOCKED' | 'BUSY' | 'CONNECTED' = 'DISCONNECTED' - get status () { return this.#status } - openTimeout = 3000 - listenTimeout = 30000; - transport: Transport | null = null - DynamicTransport: typeof TransportBLE | typeof TransportUSB | typeof TransportHID = TransportHID - async init (): Promise { await this.checkBrowserSupport() const { usb } = globalThis.navigator