```
feat: add market stats endpoint, wallet integration, and browser wallet link - Update devnet genesis timestamp to 1767000206 - Add market statistics endpoint with 24h volume, price change, and payment counts - Add wallet balance and info API endpoints in exchange router - Remove unused SessionDep dependencies from exchange endpoints - Integrate real AITBC wallet extension connection in trade-exchange UI - Add market data fetching with API fallback for price and volume display - Add cache-busting query
This commit is contained in:
21
scripts/return_testnet_btc.sh
Executable file
21
scripts/return_testnet_btc.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# Script to return testnet Bitcoin
|
||||
|
||||
RETURN_ADDRESS="tb1qerzrlxcfu24davlur5sqmgzzgsal6wusda40er"
|
||||
|
||||
echo "Checking balance..."
|
||||
BALANCE=$(bitcoin-cli -testnet -rpcwallet=aitbc_exchange getbalance)
|
||||
|
||||
if [ "$(echo "$BALANCE > 0" | bc)" -eq 1 ]; then
|
||||
echo "Current balance: $BALANCE BTC"
|
||||
echo "Sending to return address: $RETURN_ADDRESS"
|
||||
|
||||
# Calculate amount to send (balance minus small fee)
|
||||
SEND_AMOUNT=$(echo "$BALANCE - 0.00001" | bc)
|
||||
|
||||
TXID=$(bitcoin-cli -testnet -rpcwallet=aitbc_exchange sendtoaddress "$RETURN_ADDRESS" "$SEND_AMOUNT")
|
||||
echo "Transaction sent! TXID: $TXID"
|
||||
echo "Explorer: https://blockstream.info/testnet/tx/$TXID"
|
||||
else
|
||||
echo "No Bitcoin to return. Current balance: $BALANCE BTC"
|
||||
fi
|
||||
Reference in New Issue
Block a user