aboutsummaryrefslogtreecommitdiffstats
path: root/doc/i18n.md
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-21 17:05:30 -0800
committerAdam Soltys <[email protected]>2023-02-21 17:05:30 -0800
commit0a0b7f07d59d0765b86ffac6043384ebbeaac087 (patch)
treef0f59e32147831beeae6266bbc60952f54a7644a /doc/i18n.md
parentafc97da200d0567995f9e13396e985b9cae7849f (diff)
downloadcoinos-ui-0a0b7f07d59d0765b86ffac6043384ebbeaac087.tar.gz
coinos-ui-0a0b7f07d59d0765b86ffac6043384ebbeaac087.zip
max send button
Diffstat (limited to 'doc/i18n.md')
0 files changed, 0 insertions, 0 deletions
17
18
19
20


              
            





                                                                                                                             
                                       

                                                  



                                               


           
#!/bin/bash

sats=100000000
threshold=$1
while true
do
  ln=$(lncli --lnddir=/root/.lnda --network=mainnet --chain=bitcoin --rpcserver=localhost:10001 channelbalance | jr .balance)
  bc=$(bitcoin-cli getbalance)
  el=$(elements-cli getbalance | jr .bitcoin)
  total=$(node -pe "$ln + $bc * $sats + $el * $sats")
  low=$(node -pe "$total < $threshold")
  echo $(date -Is) ln $ln bc $bc el $el tot $total
  if "$low"; then 
    echo "Threshold hit, setting new threshold"
    threshold=$total
    # yarn pm2 stop 0 > /dev/null
   node /root/mailgun/index.js
  fi
  sleep 10 
done