diff --git a/impls/monero.ts/src/pending_transaction.ts b/impls/monero.ts/src/pending_transaction.ts index 12ad7193..169332fd 100644 --- a/impls/monero.ts/src/pending_transaction.ts +++ b/impls/monero.ts/src/pending_transaction.ts @@ -43,10 +43,17 @@ export class PendingTransaction { } async commitUR(maxFragmentLength: number): Promise { - const result = await getSymbol("PendingTransaction_commitUR")( + const commitUR = getSymbol("PendingTransaction_commitUR"); + + if (!commitUR) { + return null; + } + + const result = await commitUR( this.#pendingTxPtr, maxFragmentLength, ); + if (!result) return null; await this.throwIfError(); return await readCString(result) || null; diff --git a/impls/monero.ts/src/symbols.ts b/impls/monero.ts/src/symbols.ts index 0c91f38c..38707b8f 100644 --- a/impls/monero.ts/src/symbols.ts +++ b/impls/monero.ts/src/symbols.ts @@ -418,6 +418,7 @@ export const moneroSymbols = { result: "bool", }, "MONERO_PendingTransaction_commitUR": { + optional: true, nonblocking: true, // void* pendingTx_ptr, int max_fragment_length parameters: ["pointer", "i32"],