From 2d9cfaa3e67e85204db2b3dedeecaa254ea196cf Mon Sep 17 00:00:00 2001 From: Im-Beast Date: Thu, 19 Dec 2024 16:28:09 +0100 Subject: feat!(monero.ts): make `createTransactionMultDest` optionally return `null` --- impls/monero.ts/src/wallet.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'impls/monero.ts/src/wallet.ts') diff --git a/impls/monero.ts/src/wallet.ts b/impls/monero.ts/src/wallet.ts index 673ccab..92832da 100644 --- a/impls/monero.ts/src/wallet.ts +++ b/impls/monero.ts/src/wallet.ts @@ -286,8 +286,8 @@ export class Wallet { preferredInputs: string[] = [], mixinCount = 0, paymentId = "", - ): Promise { - const pendingTxPtr = await fns.Wallet_createTransactionMultDest( + ): Promise { + const pendingTxPtr = await fns.Wallet_createTransactionMultDest?.( this.#ptr, CString(destinationAddresses.join(SEPARATOR)), C_SEPARATOR, @@ -301,6 +301,8 @@ export class Wallet { CString(preferredInputs.join(SEPARATOR)), C_SEPARATOR, ); + + if (!pendingTxPtr) return null; return PendingTransaction.new(pendingTxPtr as PendingTransactionPtr); } -- cgit v1.2.3