From 2de86d120c0c764800571dc0de0defd680d1fca4 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 27 Feb 2024 03:12:15 +0100 Subject: [PATCH] bugs & fix --- API/QRCODE.sh | 2 +- RUNTIME/VOEUX.refresh.sh | 7 ++++--- RUNTIME/ZEN.SECTOR.memory.sh | 1 + RUNTIME/ZEN.UMAP.memory.sh | 1 + tools/my.sh | 2 +- tools/search_for_this_email_in_players.sh | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 85ce5b325..49e0737bc 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -613,7 +613,7 @@ if [[ ${QRCODE:0:2} == "G1" && ${AND} == "tw" ]]; then ############################################## echo "## IPNS G1Voeu APP REDIRECT" tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' "${MOATS}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]' - cat ~/.zen/tmp/${MOATS}.g1voeu.json | jq -r '.[].wish' > ~/.zen/tmp/${MOATS}.g1wishes.txt + cat ~/.zen/tmp/${MOATS}.g1voeu.json | jq -r 'map(select(.wish != null)) | .[].wish' > ~/.zen/tmp/${MOATS}.g1wishes.txt cat ~/.zen/tmp/${MOATS}.g1wishes.txt while read WISH do diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index c7aca3bfb..02172092e 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -54,9 +54,10 @@ echo "Exporting ${PLAYER} TW [tag[G1Voeu]]" rm -f ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json tiddlywiki --load ${INDEX} --output ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu --render '.' "${PLAYER}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]' -[[ ! -s ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json ]] && echo "AUCUN G1VOEU - EXIT -" && exit 0 +[[ ! -s ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json ]] \ + && echo "AUCUN G1VOEU - EXIT -" && exit 0 -cat ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json | jq -r '.[].wish' > ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt +cat ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json | jq -r 'map(select(.wish != null)) | .[].wish' > ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt wishnumbers=$(cat ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt | wc -l) echo "${wishnumbers} VOEUX : ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt " @@ -316,7 +317,7 @@ if [[ ${wishnumbers} -gt 0 ]]; then to ${SECTOR} WALLET ${SECTORG1PUB}" echo "************************************************************" MYWISHFLUX=$(ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/* | tail -n 1) # ADDING JSONS TO IPFS - ${MY_PATH}/../tools/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${G1AMOUNT}" "${SECTORG1PUB}" "/ipfs/${MYWISHFLUX}" + ${MY_PATH}/../tools/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${G1AMOUNT}" "${SECTORG1PUB}" "UPLANET:WISHES:/ipfs/${MYWISHFLUX}" fi ################################################ ################################################ GRATITUDE SENT TO SECTOR diff --git a/RUNTIME/ZEN.SECTOR.memory.sh b/RUNTIME/ZEN.SECTOR.memory.sh index 06dc1e1c4..092a5b3f1 100755 --- a/RUNTIME/ZEN.SECTOR.memory.sh +++ b/RUNTIME/ZEN.SECTOR.memory.sh @@ -51,6 +51,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${REGION}.g1history.json ]]; then todate=$(echo "$intercom" | grep -oP 'UPLANET:'"${SECTOR}"':\K[^:]*') echo "SYNC ~/.zen/tmp/${MOATS}/${SECTOR} <=> /ipfs/$ipfs_pop" + ## TODO: SECURITY PATCH : check payment emitter is SECTORG1PUB if [[ $ipfs_pop ]]; then echo "from $todate memory slot" ipfs --timeout 90s get -o ~/.zen/tmp/${MOATS}/${SECTOR} /ipfs/$ipfs_pop diff --git a/RUNTIME/ZEN.UMAP.memory.sh b/RUNTIME/ZEN.UMAP.memory.sh index 3939ca542..569940cf5 100755 --- a/RUNTIME/ZEN.UMAP.memory.sh +++ b/RUNTIME/ZEN.UMAP.memory.sh @@ -54,6 +54,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then todate=$(echo "$intercom" | grep -oP 'UPLANET:'"${UMAP}"':\K[^:]*') echo "SYNC ~/.zen/tmp/${MOATS}/${UMAP} <=> /ipfs/$ipfs_pop" + ## TODO: SECURITY PATCH : check payment emitter is UMAPG1PUB if [[ $ipfs_pop ]]; then echo "from $todate memory slot" ipfs --timeout 90s get -o ~/.zen/tmp/${MOATS}/${UMAP} /ipfs/$ipfs_pop diff --git a/tools/my.sh b/tools/my.sh index 75edd2622..af1d1f2b0 100755 --- a/tools/my.sh +++ b/tools/my.sh @@ -519,7 +519,7 @@ if [[ $XDG_SESSION_TYPE == 'x11' || $XDG_SESSION_TYPE == 'wayland' ]]; then fi ## https://git.p2p.legal/qo-op/OSM2IPFS -EARTHCID="/ipfs/QmZZBQJUSVoSGZo25xKoYXEZAfz8qjRUHb8wtsTpSL3CWL" +EARTHCID="/ipfs/QmXWDm78ne22ou9kmRPFqVa3e15BNHsXBZe4Y9KmgBPmJL" FLIPPERCID="${EARTHCID}/coinflip" ### EASTER EGG ########################### diff --git a/tools/search_for_this_email_in_players.sh b/tools/search_for_this_email_in_players.sh index 291a8bf9e..aab5f1963 100755 --- a/tools/search_for_this_email_in_players.sh +++ b/tools/search_for_this_email_in_players.sh @@ -45,7 +45,7 @@ if [[ "${EMAIL}" =~ ^[a-zA-Z0-9.%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then ## GET ASTRONAUTENS - field was missing in TW model Astroport Tiddler - ASTRONAUTENS=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astronautens) [[ ${ASTRONAUTENS} == "null" || ${ASTRONAUTENS} == "" ]] && ASTRONAUTENS="/ipns/"$(ipfs key list -l | grep -w ${ASTROG1} | cut -d ' ' -f1) - [[ ${ASTRONAUTENS} == "/ipns/" ]] && ASTRONAUTENS="" + [[ ${ASTRONAUTENS} == "/ipns/" ]] && ASTRONAUTENS="/ipfs/${TWCHAIN}" else ASTRONAUTENS="/ipfs/${EXTERNAL}" ASTROPORT="/ipns/$(echo $INDEX | rev | cut -d / -f 4 | rev)"