From: Chris Duncan Date: Thu, 6 Aug 2026 05:49:51 +0000 (-0700) Subject: Specify action type in vault request calls. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=77f15fde5ed5e8950457c2871337ce5a12c5f1e3;p=libnemo.git Specify action type in vault request calls. --- diff --git a/src/lib/wallet/load.ts b/src/lib/wallet/load.ts index 49bac76..5f2495a 100644 --- a/src/lib/wallet/load.ts +++ b/src/lib/wallet/load.ts @@ -33,7 +33,7 @@ export async function _load (wallet: Wallet, vault: Vault, password: unknown, se if (mnemonicSalt !== undefined && typeof mnemonicSalt !== 'string') { throw new TypeError('Mnemonic salt must be a string') } - const data: Record = { + const data: Record & Record<'action', 'load'> = { action: 'load', type: wallet.type, id: wallet.id, diff --git a/src/lib/wallet/verify.ts b/src/lib/wallet/verify.ts index 669949a..f257257 100644 --- a/src/lib/wallet/verify.ts +++ b/src/lib/wallet/verify.ts @@ -15,7 +15,7 @@ export async function _verify (type: WalletType, vault: Vault, secret: unknown): if (type === 'Ledger') { return await Ledger.verify(secret) } else { - const data: Record = { + const data: Record & Record<'action', 'verify'> = { action: 'verify' } if (/^(?:[A-F0-9]{64}){1,2}$/i.test(secret)) {