()
| 500 | } |
| 501 | |
| 502 | async getPasswordWithRetry(): Promise<string> { |
| 503 | let password; |
| 504 | if (this.isWalletEncrypted()) { |
| 505 | password = await getPassword('Wallet password:', { |
| 506 | hidden: true, |
| 507 | validate: (input) => { |
| 508 | try { |
| 509 | this.#walletData.key.get(input); |
| 510 | } catch { |
| 511 | return 'Invalid password. Please try again.'; |
| 512 | } |
| 513 | } |
| 514 | }); |
| 515 | } |
| 516 | return password; |
| 517 | } |
| 518 | |
| 519 | async signTxp(args: { |
| 520 | txp: Txp; |
no test coverage detected