* Removes encrypted secrets in storage and releases variable references to\r
* allow garbage collection.\r
*/\r
- destroy () {\r
- super.destroy()\r
+ async destroy (): Promise<void> {\r
+ await super.destroy()\r
this.#poolBip44Ckd.terminate()\r
}\r
\r
* Removes encrypted secrets in storage and releases variable references to\r
* allow garbage collection.\r
*/\r
- destroy (): void {\r
+ async destroy (): Promise<void> {\r
let i = 0\r
for (const a in this.#accounts) {\r
this.#accounts[a].destroy()\r
this.#mnemonic = null\r
this.#seed = null\r
this.#poolNanoNacl.terminate()\r
- this.#poolSafe.assign({\r
+ await this.#poolSafe.assign({\r
method: 'destroy',\r
name: this.id\r
- }).finally(this.#poolSafe.terminate)\r
+ })\r
+ this.#poolSafe.terminate()\r
}\r
\r
/**\r
password = utf8.toBytes(password)\r
}\r
try {\r
- const { id, mnemonic, seed } = await this.#poolSafe.assign({\r
+ const data = await this.#poolSafe.assign({\r
method: 'get',\r
name: this.id,\r
password\r
})\r
+ console.log(data[0].result)\r
+ const { id, mnemonic, seed } = data[0].result\r
if (id !== this.id) {\r
throw null\r
}\r