]> git.codecow.com Git - libnemo.git/commitdiff
Fix wallet restore from db id.
authorChris Duncan <chris@zoso.dev>
Sat, 2 Aug 2025 09:37:56 +0000 (02:37 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 2 Aug 2025 09:37:56 +0000 (02:37 -0700)
src/lib/wallet.ts

index c21aabc6faa63e00afaa4766dd26f6e06cb7ad33..541221d3c58622953d3daa8a05063673ddda3038 100644 (file)
@@ -147,7 +147,9 @@ export class Wallet {
                                throw new Error('Invalid wallet type from database')\r
                        }\r
                        Wallet.#isInternal = true\r
-                       return new this(type)\r
+                       const self = new this(type)\r
+                       self.#id = id\r
+                       return self\r
                } catch (err) {\r
                        throw new Error('Failed to restore wallet', { cause: err })\r
                }\r