mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2024-12-22 11:39: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
|
#!/bin/bash
|
||||||
|
|
||||||
## Prompt for user input
|
## 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
|
read -p 'Full name of coin to add [example: litecoin] ' addcoin
|
||||||
## Confirm
|
## Confirm
|
||||||
read -p $'\nAdd '$addcoin' to your BasicSwap install, correct? Press ENTER to continue. CTRL-C to exit'
|
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=(
|
chain=(
|
||||||
bitcoin
|
bitcoin
|
||||||
|
bitcoincash
|
||||||
dash
|
dash
|
||||||
decred
|
decred
|
||||||
firo
|
firo
|
||||||
|
@ -23,22 +24,26 @@ wownero
|
||||||
list=""
|
list=""
|
||||||
select=""
|
select=""
|
||||||
for coin in "${chain[@]}"; do
|
for coin in "${chain[@]}"; do
|
||||||
if [[ -d $BINDIR/$coin ]]; then
|
if [[ $coin == bitcoincash ]]; then
|
||||||
if [[ $coin == decred ]]; then
|
coind="bitcoin"
|
||||||
UPDATE=$($BINDIR/$coin/dcrd --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
elif [[ $coin == decred ]]; then
|
||||||
|
coind="dcr"
|
||||||
else
|
else
|
||||||
UPDATE=$($BINDIR/$coin/"$coin"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
coind="$coin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -d $BINDIR/$coin ]]; then
|
||||||
|
UPDATE=$($BINDIR/$coin/"$coind"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $UPDATE ]]; then
|
if [[ -z $UPDATE ]]; then
|
||||||
select+="$coin,"
|
select+="$coin,"
|
||||||
list=${select%,}
|
list="${select%,}"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Updating $list"
|
|
||||||
|
|
||||||
if [[ -n $select ]]; then
|
if [[ -n $select ]]; then
|
||||||
|
echo "Updating $list"
|
||||||
. $SWAP_DATADIR/venv/bin/activate
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list
|
basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## Prompt for user input
|
## 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
|
read -p 'Full name of coin to disable [example: wownero] ' disablecoin
|
||||||
## Confirm
|
## Confirm
|
||||||
printf "\nDisable $disablecoin on your BasicSwap install, correct? Press any key to continue. CTRL-C to exit\n"
|
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 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)
|
dcrd version 1.8.1+release (Go version go1.21.1 linux/amd64)
|
||||||
Dash Core version v21.1.0
|
Dash Core version v21.1.0
|
||||||
Firo Core Daemon version v0.14.14.0-ge0c423805
|
Firo Core Daemon version v0.14.14.0-ge0c423805
|
||||||
|
|
Loading…
Reference in a new issue