2024-01-22 22:06:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
## Prompt for user input
|
2024-11-09 03:03:53 +00:00
|
|
|
printf "\n\nThe following coins can be added (case sensitive)\nbitcoin\ndash\ndecred\nfiro\nlitecoin\npivx\nwownero\n\n"
|
2024-01-22 22:06:38 +00:00
|
|
|
read -p 'Full name of coin to add [example: litecoin] ' addcoin
|
|
|
|
## Confirm
|
2024-06-04 02:20:34 +00:00
|
|
|
read -p $'\nAdd '$addcoin' to your BasicSwap install, correct? Press ENTER to continue. CTRL-C to exit'
|
|
|
|
|
2024-01-22 22:06:38 +00:00
|
|
|
## Add the coin
|
|
|
|
if [ $addcoin = bitcoin ]; then
|
|
|
|
read -p 'Use --usebtcfastsync for bitcoin? [Y/n] ' btcfastsync
|
|
|
|
|
|
|
|
case $btcfastsync in
|
|
|
|
n | N) confirmed=no;;
|
|
|
|
*) confirmed=yes;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ $confirmed = yes ]; then
|
2024-02-12 22:57:48 +00:00
|
|
|
echo "Using btcfastsync"
|
2024-02-24 16:24:07 +00:00
|
|
|
basicswap-prepare --usebtcfastsync --datadir=$SWAP_DATADIR --addcoin=$addcoin
|
2024-01-22 22:06:38 +00:00
|
|
|
else
|
2024-02-12 22:57:48 +00:00
|
|
|
echo "Not using btcfastsync"
|
2024-02-24 16:24:07 +00:00
|
|
|
basicswap-prepare --datadir=$SWAP_DATADIR --addcoin=$addcoin
|
2024-01-22 22:06:38 +00:00
|
|
|
fi
|
|
|
|
else
|
2024-02-24 16:24:07 +00:00
|
|
|
basicswap-prepare --datadir=$SWAP_DATADIR --addcoin=$addcoin
|
2024-01-22 22:06:38 +00:00
|
|
|
fi
|