Replace Silkaj by Jaklis

This commit is contained in:
poka 2021-02-26 03:22:21 +01:00
parent 4418e2f11d
commit c7ebb9d2b4
4 changed files with 8 additions and 8 deletions

View File

@ -51,7 +51,6 @@ source $GPATH/lib/scanTxWallets.sh
### Extraction des adresses Ḡ1 actives
scanTxWallets
### Calcul la somme des soldes portefeuilles et membres
sumSoldes

View File

@ -81,7 +81,6 @@ web() {
sumSoldes() {
source $GPATH/explorer.sh -c > /dev/null
sumRW=$(day | jq '.rWallets' | sed ':a;s/\B[0-9]\{3\}\>/ &/;ta')
sumRM=$(day | jq '.rMembers' | sed ':a;s/\B[0-9]\{3\}\>/ &/;ta')
sumRT=$(total | jq '.totalExchange' | sed ':a;s/\B[0-9]\{3\}\>/ &/;ta')

View File

@ -40,6 +40,9 @@ scanTxWallets() {
# Récupération de la date du block
local blockDate=$(jq '.medianTime' <<<"$blocBrut")
#kopa echo "$blocBrut"
# echo "---"
# echo "$blockDate"
blockDate=$(date -d"@$blockDate" +%d-%m-%y -u)
local walletsReceivedBloc=$(jq '.transactions[]' <<<"$blocBrut")

View File

@ -6,22 +6,21 @@ GPATH="$( cd "$(dirname "$0")" ; pwd -P )/.."
source $GPATH/.env
node=$(cut -d '/' -f3 <<<"$DUNITER")
#Check if Silkaj is installed
[[ -z $SILKAJ ]] && SILKAJ=$(which silkaj)
[[ -z $SILKAJ ]] && echo "Erreur: Vous devez installer Silkaj." && exit 1
#Check if Jaklis is installed
[[ -z $JAKLIS ]] && JAKLIS=$(which silkaj)
[[ -z $JAKLIS ]] && echo "Erreur: Vous devez installer Jaklis." && exit 1
work() {
for i in $wallets; do
exec() {
balance=$($SILKAJ -p $node balance $i 2>/dev/null)
balance=$($JAKLIS balance -p $i 2>/dev/null)
}
exec
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
unset k
balance=$(awk '/Total Quantitative =/ { print $4 }' <<<"$balance")
if [[ $1 == "members" ]]; then
username=$(curl -m 20 -s $DUNITER/wot/members | jq -r --arg pubkey "$i" '.results[] | select(.pubkey==$pubkey) | .uid')
username=$($JAKLIS id -p $i | jq -r .username)
formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
unset username