]> git.codecow.com Git - libnemo.git/commitdiff
Throw if more than one index passed in signing request.
authorChris Duncan <chris@codecow.com>
Sun, 9 Aug 2026 09:40:40 +0000 (02:40 -0700)
committerChris Duncan <chris@codecow.com>
Sun, 9 Aug 2026 09:40:40 +0000 (02:40 -0700)
src/lib/vault/vault-worker.ts

index d507b1ee8b26f26fd616bea28615bae106419eeb..c54bedbdb5a5ad3d31cd1f8b6fe505ca754393c9 100644 (file)
@@ -263,6 +263,9 @@ function sign (index?: Uint32Array, data?: ArrayBuffer): Promise<Record<string,
                if (index == null) {
                        throw new VaultError('Wallet account index is required to sign')
                }
+               if (index.length !== 1) {
+                       throw new VaultError('Wallet cannot sign from multiple account indexes')
+               }
                if (data == null) {
                        throw new VaultError('Data to sign not found')
                }