if (typeof this.#seed === 'string') {\r
data.seed = this.#seed\r
}\r
- const res = await this.#poolSafe.assign({\r
+ const response = (await this.#poolSafe.assign({\r
method: 'put',\r
name: this.id,\r
password,\r
data\r
- })\r
- const success = res[0].result\r
+ }))[0]\r
+ const success = response.result\r
if (!success) {\r
throw null\r
}\r
throw new Error('Failed to unlock wallet')\r
}\r
try {\r
- const res = await this.#poolSafe.assign({\r
+ const response = (await this.#poolSafe.assign({\r
method: 'get',\r
name: this.id,\r
password\r
- })\r
- const { id, mnemonic, seed } = res[0].result\r
+ }))[0]\r
+ const { id, mnemonic, seed } = response.result\r
if (id !== this.id) {\r
throw null\r
}\r