From 3c2642e7cfed733df96f023c0b8be6f49ab58091 Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Wed, 22 Oct 2025 14:18:50 +0000 Subject: [PATCH 1/3] shared: add zeromq to macos dependencies --- bsx/shared.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsx/shared.sh b/bsx/shared.sh index da4d8f9..68a7a31 100755 --- a/bsx/shared.sh +++ b/bsx/shared.sh @@ -172,7 +172,7 @@ detect_os_arch() { green "Installing Homebrew" INSTALL="curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | /bin/bash && brew install" fi - DEPENDENCY="python gnupg pkg-config coreutils" + DEPENDENCY="python gnupg pkg-config coreutils zeromq" green "\n\nDetected MacOS" elif type -p dnf > /dev/null; then # Fedora From 727fd1d534cde36b4e3589615879374d68dd449c Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Wed, 22 Oct 2025 14:22:54 +0000 Subject: [PATCH 2/3] workflow: fix typos --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfc45f0..c3050a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: types: - opened - reopened - - syncronize + - synchronize push: # branches: # - master @@ -29,7 +29,7 @@ jobs: formatting: runs-on: ubuntu-latest steps: - - uses: actions/checkout/@v4 + - uses: actions/checkout@v4 - name: Install dependencies run: | npm install prettier prettier-plugin-sh --save-dev @@ -89,7 +89,7 @@ jobs: name: 'macOS (brew)' runs-on: macOS-latest steps: - - uses: actions/checkout/@v4 + - uses: actions/checkout@v4 - name: Install basicswap-bash run: | ./basicswap-install.sh --new --tor --internal --regtest From 382a5db836ec08427ba093142219efaee2dd280d Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Wed, 22 Oct 2025 14:44:46 +0000 Subject: [PATCH 3/3] addcoin: add bash 3.2 compat (for macos) --- bsx/addcoin.sh | 8 ++++++-- bsx/shared.sh | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/bsx/addcoin.sh b/bsx/addcoin.sh index f0310da..bdfc25d 100755 --- a/bsx/addcoin.sh +++ b/bsx/addcoin.sh @@ -22,9 +22,13 @@ manage_daemon_false() { ## Remote node detect_os_arch -if [[ -z "${MACOS}" ]] && ! [[ "${local_only[@]}" =~ "${addcoin}" ]]; then +if ! [[ "${local_only[@]}" =~ "${addcoin}" ]]; then # Set wallet name - ticker="${coin_map[$addcoin]}" + if [[ "${MACOS}" ]]; then + ticker="$(get_coin_ticker "${addcoin}")" + else + ticker="${coin_map[$addcoin]}" + fi wallet_env="${ticker}_WALLET_NAME" wallet_name="BSX_${ticker}" diff --git a/bsx/shared.sh b/bsx/shared.sh index 68a7a31..a59499e 100755 --- a/bsx/shared.sh +++ b/bsx/shared.sh @@ -54,6 +54,24 @@ if [[ -z "${MACOS}" ]]; then ) fi +# Coin map (Bash 3.2 compatible for MacOS) +get_coin_ticker() { + case "$1" in + bitcoin) echo "BTC" ;; + bitcoincash) echo "BCH" ;; + dash) echo "DASH" ;; + decred) echo "DCR" ;; + dogecoin) echo "DOGE" ;; + firo) echo "FIRO" ;; + litecoin) echo "LTC" ;; + monero) echo "XMR" ;; + namecoin) echo "NMC" ;; + pivx) echo "PIVX" ;; + wownero) echo "WOW" ;; + *) red "Invalid coin \"$1\"" && exit 1 ;; + esac +} + # Activate venv activate_venv() { source $SWAP_DATADIR/venv/bin/activate