]> git.codecow.com Git - libnemo.git/commitdiff
Destroy accounts in safe asynchronously too.
authorChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 20:27:17 +0000 (13:27 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 20:27:17 +0000 (13:27 -0700)
src/lib/account.ts
src/lib/wallets/wallet.ts

index 315a8b859bf848cbe61536a36abd82ffafad9036..2bc5c1d62aaeebf2d9c2614c6afa81cda636e19b 100644 (file)
@@ -72,8 +72,8 @@ export class Account {
        * Removes encrypted secrets in storage and releases variable references to\r
        * allow garbage collection.\r
        */\r
-       destroy (): void {\r
-               Account.#poolSafe.assign({\r
+       async destroy (): Promise<void> {\r
+               await Account.#poolSafe.assign({\r
                        method: 'destroy',\r
                        name: this.#pub\r
                })\r
index 726d20af4a6d77562b54da5ea8490b0f8e167f65..a88356361fee3d52252fd95752986d7c57f8a545 100644 (file)
@@ -68,7 +68,7 @@ export abstract class Wallet {
        async destroy (): Promise<void> {\r
                let i = 0\r
                for (const a in this.#accounts) {\r
-                       this.#accounts[a].destroy()\r
+                       await this.#accounts[a].destroy()\r
                        delete this.#accounts[a]\r
                        i++\r
                }\r