Skip to content

Commit

Permalink
fix: commitUR not being a symbol in wownero
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Oct 15, 2024
1 parent a455f83 commit d566c8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion impls/monero.ts/src/pending_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@ export class PendingTransaction {
}

async commitUR(maxFragmentLength: number): Promise<string | null> {
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;
Expand Down
1 change: 1 addition & 0 deletions impls/monero.ts/src/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit d566c8a

Please sign in to comment.