From: Chris Duncan Date: Wed, 20 Aug 2025 18:50:30 +0000 (-0700) Subject: Allow undefined input for account rep. X-Git-Tag: v0.10.5~41^2~41 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=9e8f389b9da9bdd223c5fec6676959f4d3f7b666;p=libnemo.git Allow undefined input for account rep. --- diff --git a/src/lib/account.ts b/src/lib/account.ts index cfb7d08..f624d0b 100644 --- a/src/lib/account.ts +++ b/src/lib/account.ts @@ -81,7 +81,7 @@ export class Account { set open_block (v: string | undefined) { this.#open_block = v } set receivable (v: bigint | number | string) { this.#receivable = BigInt(v) } set representative (v: unknown) { - if (v instanceof Account) { + if (v instanceof Account || v === undefined) { this.#representative = v } else if (typeof v === 'string') { this.#representative = Account.load(v)