Snapshot: full project state
This commit is contained in:
16
link-wallet.sh
Normal file
16
link-wallet.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
PW=$(grep -oE "Password=[^;]*" /etc/btcpay/btcpay.config | head -1 | cut -d= -f2)
|
||||
export PGPASSWORD="$PW"
|
||||
PSQL="psql -h localhost -U btcpay -d btcpay -t -A"
|
||||
|
||||
SRC=$($PSQL -c "SELECT \"StoreName\" FROM \"Stores\" WHERE \"DerivationStrategies\" IS NOT NULL AND \"DerivationStrategies\"::text != '{}' ORDER BY \"StoreName\" LIMIT 1")
|
||||
echo "source store: $SRC"
|
||||
|
||||
$PSQL -c "UPDATE \"Stores\" SET \"DerivationStrategies\" = (SELECT \"DerivationStrategies\" FROM \"Stores\" WHERE \"StoreName\"='$SRC'), \"DerivationStrategy\"='BTC-CHAIN' WHERE \"StoreName\"='Supernova'"
|
||||
echo "wallet copy done"
|
||||
|
||||
$PSQL -c "UPDATE \"Stores\" SET \"StoreBlob\" = jsonb_set(COALESCE(\"StoreBlob\",'{}'), '{networkFeeMode}', '\"Always\"', true) WHERE \"StoreName\"='Supernova'"
|
||||
echo "networkFeeMode set"
|
||||
|
||||
echo "=== verify ==="
|
||||
$PSQL -c "SELECT \"StoreName\", \"DerivationStrategy\", (\"DerivationStrategies\"->'BTC-CHAIN'->>'accountDerivation') IS NOT NULL AS has_xpub FROM \"Stores\" WHERE \"StoreName\"='Supernova'"
|
||||
Reference in New Issue
Block a user