From 85770ea6f1dab106754675f40e1334e575e03646 Mon Sep 17 00:00:00 2001 From: Mateusz Franik <47059999+Im-Beast@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:39:28 +0100 Subject: tests: run integration and regression tests on other platforms (#93) * tests: add script to download test dependencies from fallback mirrors * tests: use the new download_deps script, run tests on macos * ci: download proper artifact for macos * chore: make download_deps script download everything to dir named `monero_c` when ran directly * tests: await downloading deps * tests download proper monero_c version in prepareMoneroC * tests: fix typos * tests: add file data for more targets * tests: print why retrieving tags failed * chore: change mirror url endpoint from `monero_c` to `download_mirror` * tests: use cached releases endpoint to prevent ratelimits * ci: remove brew@1.76 dependency * tests: fix macos dylib path * feat!(monero.ts): make `createTransactionMultDest` optionally return `null` * feat(monero.ts): make `Wallet_reconnectDevice` symbol optional * tests: don't try to extract file if out already exists * tests: remove unnecesary directory rm calls * ci: set regression tests to use canary --- impls/monero.ts/src/symbols.ts | 2 ++ impls/monero.ts/src/wallet.ts | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'impls/monero.ts/src') diff --git a/impls/monero.ts/src/symbols.ts b/impls/monero.ts/src/symbols.ts index 2c34a6e..91d95b2 100644 --- a/impls/monero.ts/src/symbols.ts +++ b/impls/monero.ts/src/symbols.ts @@ -1548,6 +1548,7 @@ export const moneroSymbols = { ], }, MONERO_Wallet_createTransactionMultDest: { + optional: true, nonblocking: true, result: "pointer", parameters: [ @@ -1956,6 +1957,7 @@ export const moneroSymbols = { ], }, MONERO_Wallet_reconnectDevice: { + optional: true, nonblocking: true, result: "bool", parameters: ["pointer"] as [ 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