mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2024-12-22 03:29:21 +00:00
coins: add bitcoincash
This commit is contained in:
parent
b52b7e8c92
commit
7f8b90fea4
4 changed files with 19 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Prompt for user input
|
||||
printf "\n\nThe following coins can be added (case sensitive)\nbitcoin\ndash\ndecred\nfiro\nlitecoin\npivx\nwownero\n\n"
|
||||
printf "\n\nThe following coins can be added (case sensitive)\nbitcoin\nbitcoincash\ndash\ndecred\nfiro\nlitecoin\npivx\nwownero\n\n"
|
||||
read -p 'Full name of coin to add [example: litecoin] ' addcoin
|
||||
## Confirm
|
||||
read -p $'\nAdd '$addcoin' to your BasicSwap install, correct? Press ENTER to continue. CTRL-C to exit'
|
||||
|
|
|
@ -10,6 +10,7 @@ echo "Checking for Coin updates" && sleep 1
|
|||
|
||||
chain=(
|
||||
bitcoin
|
||||
bitcoincash
|
||||
dash
|
||||
decred
|
||||
firo
|
||||
|
@ -23,22 +24,26 @@ wownero
|
|||
list=""
|
||||
select=""
|
||||
for coin in "${chain[@]}"; do
|
||||
if [[ $coin == bitcoincash ]]; then
|
||||
coind="bitcoin"
|
||||
elif [[ $coin == decred ]]; then
|
||||
coind="dcr"
|
||||
else
|
||||
coind="$coin"
|
||||
fi
|
||||
|
||||
if [[ -d $BINDIR/$coin ]]; then
|
||||
if [[ $coin == decred ]]; then
|
||||
UPDATE=$($BINDIR/$coin/dcrd --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
||||
else
|
||||
UPDATE=$($BINDIR/$coin/"$coin"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
||||
fi
|
||||
if [[ -z $UPDATE ]]; then
|
||||
select+="$coin,"
|
||||
list=${select%,}
|
||||
fi
|
||||
UPDATE=$($BINDIR/$coin/"$coind"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
||||
fi
|
||||
|
||||
if [[ -z $UPDATE ]]; then
|
||||
select+="$coin,"
|
||||
list="${select%,}"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Updating $list"
|
||||
|
||||
if [[ -n $select ]]; then
|
||||
echo "Updating $list"
|
||||
. $SWAP_DATADIR/venv/bin/activate
|
||||
basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Prompt for user input
|
||||
printf "\n\nThe following coins can be disabled (case sensitive)\nbitcoin\ndash\ndecred\nfiro\nlitecoin\nmonero\npivx\nwownero\n\n"
|
||||
printf "\n\nThe following coins can be disabled (case sensitive)\nbitcoin\nbitcoincash\ndash\ndecred\nfiro\nlitecoin\nmonero\npivx\nwownero\n\n"
|
||||
read -p 'Full name of coin to disable [example: wownero] ' disablecoin
|
||||
## Confirm
|
||||
printf "\nDisable $disablecoin on your BasicSwap install, correct? Press any key to continue. CTRL-C to exit\n"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Bitcoin Core version v26.0.0
|
||||
Bitcoin Cash Node Daemon version v27.1.0-9f9aa5a6e
|
||||
dcrd version 1.8.1+release (Go version go1.21.1 linux/amd64)
|
||||
Dash Core version v21.1.0
|
||||
Firo Core Daemon version v0.14.14.0-ge0c423805
|
||||
|
|
Loading…
Reference in a new issue