]> git.codecow.com Git - libnemo.git/commitdiff
Specify action type in vault request calls.
authorChris Duncan <chris@codecow.com>
Thu, 6 Aug 2026 05:49:51 +0000 (22:49 -0700)
committerChris Duncan <chris@codecow.com>
Thu, 6 Aug 2026 05:49:51 +0000 (22:49 -0700)
src/lib/wallet/load.ts
src/lib/wallet/verify.ts

index 49bac7698faa78ab2c15dc34c34a0a30971458c4..5f2495a2b7cf884e5f73547fbf49f4637fc7bab9 100644 (file)
@@ -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<string, string | ArrayBuffer> = {
+                       const data: Record<string, string | ArrayBuffer> & Record<'action', 'load'> = {
                                action: 'load',
                                type: wallet.type,
                                id: wallet.id,
index 669949a491ea87c3cc0b36d208bb60342d08a0ea..f25725733741867e6703564631742a6b417f5a8b 100644 (file)
@@ -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<string, string | ArrayBuffer> = {
+                       const data: Record<string, string | ArrayBuffer> & Record<'action', 'verify'> = {
                                action: 'verify'
                        }
                        if (/^(?:[A-F0-9]{64}){1,2}$/i.test(secret)) {