Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types:
- opened
- reopened
- syncronize
- synchronize
push:
# branches:
# - master
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions bsx/addcoin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
20 changes: 19 additions & 1 deletion bsx/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -172,7 +190,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
Expand Down