summaryrefslogtreecommitdiff
path: root/impls/monero.ts/src/wallet.ts
diff options
context:
space:
mode:
authorcyan <cyjan@mrcyjanek.net>2024-12-30 15:07:11 +0100
committerGitHub <noreply@github.com>2024-12-30 15:07:11 +0100
commit8d3a64e05d60924272275d5674db5345f701ba2d (patch)
treedf7e63d9f2be7b550254ef7c7777d45134bd73af /impls/monero.ts/src/wallet.ts
parent35ded9142e3915c7cdf6d64c7a0f0d797fcac8c7 (diff)
parent785aca81ea4aa0081a92198e19d680d9661cba9d (diff)
Merge branch 'develop' into zano
Diffstat (limited to 'impls/monero.ts/src/wallet.ts')
-rw-r--r--impls/monero.ts/src/wallet.ts6
1 files changed, 4 insertions, 2 deletions
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<PendingTransaction> {
- const pendingTxPtr = await fns.Wallet_createTransactionMultDest(
+ ): Promise<PendingTransaction | null> {
+ 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);
}