|
|
@ -203,10 +203,13 @@ else |
|
|
|
fi |
|
|
|
else |
|
|
|
ln_walletbalance="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert walletbalance | jq -r '.confirmed_balance')" 2>/dev/null |
|
|
|
ln_walletbalance_wait="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert walletbalance | jq -r '.unconfirmed_balance')" 2>/dev/null |
|
|
|
if [ "${ln_walletbalance_wait}" = "0" ] then ln_walletbalance_wait=""; fi |
|
|
|
if [ ${#ln_walletbalance_wait} -gt 0 ] then ln_walletbalance_wait="(+${ln_walletbalance_wait})"; fi |
|
|
|
ln_channelbalance="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert channelbalance | jq -r '.balance')" 2>/dev/null |
|
|
|
ln_channels_online="$(echo "${ln_getInfo}" | jq -r '.num_active_channels')" 2>/dev/null |
|
|
|
ln_channels_total="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert listchannels | jq '.[] | length')" 2>/dev/null |
|
|
|
ln_baseInfo="${color_gray}wallet ${ln_walletbalance} sat" |
|
|
|
ln_baseInfo="${color_gray}wallet ${ln_walletbalance} sat ${ln_walletbalance_wait}" |
|
|
|
ln_peers="$(echo "${ln_getInfo}" | jq -r '.num_peers')" 2>/dev/null |
|
|
|
ln_channelInfo="${ln_channels_online}/${ln_channels_total} Channels ${ln_channelbalance} sat" |
|
|
|
ln_peersInfo="${color_purple}${ln_peers} ${color_gray}peers" |
|
|
|