Skip to content

Commit

Permalink
Merge branch 'develop' into zano
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK authored Dec 30, 2024
2 parents 35ded91 + 785aca8 commit 8d3a64e
Show file tree
Hide file tree
Showing 12 changed files with 534 additions and 145 deletions.
65 changes: 63 additions & 2 deletions .github/workflows/full_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ jobs:
cd impls/monero.ts
deno run --unstable-ffi --allow-ffi checksum.ts
regression_check:
regression_tests_linux:
name: linux regression tests
strategy:
fail-fast: false
matrix:
Expand All @@ -447,7 +448,35 @@ jobs:
- name: Run regression tests
run: COIN="${{ matrix.coin }}" deno test -A tests/regression.test.ts

integration_check:
regression_tests_macos:
name: macos regression tests
strategy:
matrix:
coin: [monero, wownero]
needs: [
lib_macos
]
runs-on: macos-14
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: canary

- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- uses: actions/download-artifact@v4
with:
name: macos ${{ matrix.coin }}
path: release/${{ matrix.coin }}

- name: Run regression tests
run: COIN="${{ matrix.coin }}" deno test -A tests/regression.test.ts

integration_tests_linux:
name: linux integration tests
strategy:
matrix:
coin: [monero, wownero]
Expand Down Expand Up @@ -478,6 +507,38 @@ jobs:
SECRET_WALLET_RESTORE_HEIGHT: ${{ secrets.SECRET_WALLET_RESTORE_HEIGHT }}


integration_tests_macos:
name: macos integration tests
strategy:
matrix:
coin: [monero, wownero]
needs: [
lib_macos
]
runs-on: macos-14
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- uses: actions/download-artifact@v4
with:
name: macos ${{ matrix.coin }}
path: release/${{ matrix.coin }}

- name: Run integration tests
run: COIN="${{ matrix.coin }}" deno test -A tests/integration.test.ts
env:
SECRET_WALLET_PASSWORD: ${{ secrets.SECRET_WALLET_PASSWORD }}
SECRET_WALLET_MNEMONIC: ${{ secrets.SECRET_WALLET_MNEMONIC }}
SECRET_WALLET_RESTORE_HEIGHT: ${{ secrets.SECRET_WALLET_RESTORE_HEIGHT }}


comment_pr:
name: comment on pr
runs-on: ubuntu-latest
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
release/
build/
tests/monero-cli
tests/wownero-cli
tests/libs
tests/dependencies
tests/wallets
12 changes: 5 additions & 7 deletions docs/Writerside/topics/macOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ Building on linux has been tested on
<tab title="Native">
<code-block>
$ # install xcode 15.4 (or current latest)
$ brew install ccache unbound [email protected] zmq autoconf automake libtool
$ brew link [email protected]
$ brew install ccache unbound zmq autoconf automake libtool
</code-block>
</tab>
<tab title="Native (Rosetta2)">
<code-block>
$ # install xcode 15.4 (or current latest)
$ brew install ccache unbound [email protected] zmq autoconf automake libtool
$ brew link [email protected]
$ arch -x86_64 brew install ccache unbound [email protected] zmq autoconf automake libtool
$ arch -x86_64 brew link [email protected]
$ brew install ccache unbound zmq autoconf automake libtool
$ arch -x86_64 brew install ccache unbound zmq autoconf automake libtool
$ arch -x86_64 brew link
</code-block>
</tab>
<tab title="Linux">
Expand Down Expand Up @@ -83,4 +81,4 @@ $ ./build_single.sh monero aarch64-apple-darwin-11 -j$(nproc)

### Creating fat library

[Check cake_wallet solution](https://github.com/cake-tech/cake_wallet/blob/main/scripts/macos/build_monero_all.sh)
[Check cake_wallet solution](https://github.com/cake-tech/cake_wallet/blob/main/scripts/macos/build_monero_all.sh)
2 changes: 2 additions & 0 deletions impls/monero.ts/src/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ export const moneroSymbols = {
],
},
MONERO_Wallet_createTransactionMultDest: {
optional: true,
nonblocking: true,
result: "pointer",
parameters: [
Expand Down Expand Up @@ -1956,6 +1957,7 @@ export const moneroSymbols = {
],
},
MONERO_Wallet_reconnectDevice: {
optional: true,
nonblocking: true,
result: "bool",
parameters: ["pointer"] as [
Expand Down
6 changes: 4 additions & 2 deletions impls/monero.ts/src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -301,6 +301,8 @@ export class Wallet {
CString(preferredInputs.join(SEPARATOR)),
C_SEPARATOR,
);

if (!pendingTxPtr) return null;
return PendingTransaction.new(pendingTxPtr as PendingTransactionPtr);
}

Expand Down
Loading

0 comments on commit 8d3a64e

Please sign in to comment.