]> git.codecow.com Git - libnemo.git/commitdiff
Fix return type for Ledger database backup.
authorChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 16:18:11 +0000 (09:18 -0700)
committerChris Duncan <chris@zoso.dev>
Wed, 20 Aug 2025 16:18:11 +0000 (09:18 -0700)
src/lib/wallet/backup.ts

index c668aa39607860caef786791d53e90c653cb9719..bbabd7ce393722b2cabfb760f6c506a73d379759 100644 (file)
@@ -14,6 +14,9 @@ export async function _backup () {
                        if (typeof id !== 'string') {
                                throw new TypeError('Retrieved invalid ID', { cause: id })
                        }
+                       if (type === 'Ledger') {
+                               return { id, type, iv: new ArrayBuffer(0), salt: new ArrayBuffer(0), encrypted: new ArrayBuffer(0) } as const
+                       }
                        if (type !== 'BIP-44' && type !== 'BLAKE2b') {
                                throw new TypeError('Retrieved invalid type', { cause: type })
                        }