Fix GVA request

This commit is contained in:
poka 2021-02-26 06:51:32 +01:00
parent f18a98f563
commit ba0f91404c
1 changed files with 12 additions and 20 deletions

View File

@ -12,30 +12,22 @@ node=$(cut -d '/' -f3 <<<"$DUNITER")
work() { work() {
for i in $wallets; do for i in $wallets; do
exec() {
jsonResult=$($JAKLIS idBalance -p $i 2>/dev/null)
}
exec
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
unset k
if [[ $1 == "members" ]]; then balance=$(echo "$jsonResult" | jq -r '.balance')
exec() { username=$(echo "$jsonResult" | jq -r '.username')
jsonResult=$($JAKLIS idBalance -p $i 2>/dev/null) formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
}
exec
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
unset k
balance=$(echo "$jsonResult" | jq -r '.balance') if [[ $1 == "members" ]]; then
username=$(echo "$jsonResult" | jq -r '.username') htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td><b>$username</b></td></tr>"
formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
unset username unset username
else else
exec() { htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
balance=$($JAKLIS id -p $i 2>/dev/null)
}
exec
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
unset k
formatedBalance=$(printf "%-10s | %-45s" $balance $i)
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td> </td></tr>"
fi fi
unset balance unset balance