From c7ebb9d2b49a6dee1e91a1ebde7995b93d06e3fb Mon Sep 17 00:00:00 2001 From: poka Date: Fri, 26 Feb 2021 03:22:21 +0100 Subject: [PATCH] Replace Silkaj by Jaklis --- g1-stats.sh | 1 - lib/functions.sh | 1 - lib/scanTxWallets.sh | 3 +++ scripts/walletsBalance.sh | 11 +++++------ 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/g1-stats.sh b/g1-stats.sh index 1293033..e8acfcd 100755 --- a/g1-stats.sh +++ b/g1-stats.sh @@ -51,7 +51,6 @@ source $GPATH/lib/scanTxWallets.sh ### Extraction des adresses Ḡ1 actives scanTxWallets - ### Calcul la somme des soldes portefeuilles et membres sumSoldes diff --git a/lib/functions.sh b/lib/functions.sh index 1a7eacd..8e53a90 100755 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -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') diff --git a/lib/scanTxWallets.sh b/lib/scanTxWallets.sh index 65ffe56..71a9d96 100755 --- a/lib/scanTxWallets.sh +++ b/lib/scanTxWallets.sh @@ -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") diff --git a/scripts/walletsBalance.sh b/scripts/walletsBalance.sh index d53350b..a9f8b87 100755 --- a/scripts/walletsBalance.sh +++ b/scripts/walletsBalance.sh @@ -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'"$balance$i$username" unset username