throw new Error('Wallet is locked')
}
if (typeof timeout === 'number') {
- if (timeout < 0) {
- throw new RangeError('Timeout must be non-negative')
+ if (timeout < 10) {
+ throw new RangeError('Timeout must be at least 10 seconds')
}
if (timeout > 600) {
- throw new RangeError('Maximum timeout is 10 minutes')
+ throw new RangeError('Timeout must be at most 10 minutes')
}
this.#timeout = timeout * 1000
this.#timer = new VaultTimer(() => this.lock(), this.#timeout)