From 4fea205f55f7b83beec79b3b34f50955830fd123 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 30 Dec 2023 02:37:54 +0100 Subject: [PATCH] reinforcement --- API/QRCODE.sh | 2 +- RUNTIME/G1PalPay.sh | 11 ++++++++--- templates/UPlanetSector/index.html | 2 +- tools/PAY4SURE.sh | 3 +++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 8a22ce401..b6db23ffe 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -101,7 +101,7 @@ if [[ ${QRCODE} == "station" ]]; then fi ## SHOW G1PALPAY FRONT (IFRAME) sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../templates/ZenStation/index.html > ~/.zen/tmp/${MOATS}/index.htm - [[ ! $isLAN ]] && sed -i "s~MENU~DEMO~g" ~/.zen/tmp/${MOATS}/index.htm + [[ ! $isLAN ]] && sed -i "s~MENU~HOSTING~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:33101~${myG1BILLET}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://astroport.localhost:1234~${myASTROPORT}~g" ~/.zen/tmp/${MOATS}/index.htm diff --git a/RUNTIME/G1PalPay.sh b/RUNTIME/G1PalPay.sh index 913a23abf..883f4505a 100755 --- a/RUNTIME/G1PalPay.sh +++ b/RUNTIME/G1PalPay.sh @@ -236,12 +236,17 @@ while read LINE; do if [[ ${ASTROG1} && ${ASTROG1} != ${G1PUB} ]]; then ## SEND zen ZEN (G1 dice JUNE) TO ALL ## MAKE ONE EACH AFTER ALL EMAIL CONSUMED ## - ~/.zen/Astroport.ONE/tools/timeout.sh -t 12 \ - ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${zen} -p ${ASTROG1} -c "${emails[@]} $TTITLE" -m > /dev/null 2>&1 + #~ ~/.zen/Astroport.ONE/tools/timeout.sh -t 12 \ + #~ ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${zen} -p ${ASTROG1} -c "${emails[@]} $TTITLE" -m > /dev/null 2>&1 ## Filling comment with email list will make players resend to all ## MAY BE A BAD IDEA ### + + ${MY_PATH}/../tools/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${zen}" "${ASTROG1}" "${emails[@]} $TTITLE" + echo "OK PalPay : $MSG" > ~/.zen/tmp/${MOATS}/g1message ## PINNING IPFS MEDIA - PROOF OF COPY SYSTEM - - [[ ! -z $TOPIN ]] && ipfs pin add $TOPIN && echo "PINNING $TOPIN" >> ~/.zen/tmp/${MOATS}/g1message + [[ ! -z $TOPIN ]] \ + && ipfs pin add $TOPIN \ + && echo "PINNING $TOPIN" >> ~/.zen/tmp/${MOATS}/g1message ${MY_PATH}/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/${MOATS}/g1message diff --git a/templates/UPlanetSector/index.html b/templates/UPlanetSector/index.html index a0c3dcfeb..cd7cad9be 100644 --- a/templates/UPlanetSector/index.html +++ b/templates/UPlanetSector/index.html @@ -158,7 +158,7 @@ iframe {
- O __ TW _ZONE_ __ TW _UPZONE_ + O __ TW _ZONE_ __ TW _UPZONE_ / Ğ diff --git a/tools/PAY4SURE.sh b/tools/PAY4SURE.sh index 5a7a6533a..b2da5f4fe 100755 --- a/tools/PAY4SURE.sh +++ b/tools/PAY4SURE.sh @@ -31,6 +31,9 @@ COINS=$($MY_PATH/COINScheck.sh ${PAYOUTPUB} | tail -n 1) ###### TEST INPUT VALUES [[ $AMOUNT == "ALL" ]] && AMOUNT=$COINS ## ALL MEAN EMPTY ORIGIN WALLET [[ -z $AMOUNT ]] && echo "ERROR : ${PAYOUTPUB}=$COINS MISSING AMOUNT" && exit 1 +if ! [[ $AMOUNT =~ '^[0-9]+([.][0-9]+)?$' ]] ; then + echo "ERROR : AMOUNT ($AMOUNT) is Not a number" && exit 1 +fi [[ $(echo "$COINS < $AMOUNT" | bc -l) -eq 1 ]] && echo "ERROR : SOURCE WALLET IS MISSING COINS !!! $AMOUNT > $COINS" && exit 1 [[ -z $G1PUB ]] && echo "ERROR : ${PAYOUTPUB}=$COINS ($AMOUNT) MISSING DESTINATION" && exit 1