exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 248fd3041bcb67b1285f2e7ee1e615413251393b
parent 6661d952f10c85b71a61691c56f6708c27da7181
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 15 Apr 2025 16:15:40 +0200

set new_measures when chaining forms

Diffstat:
Msrc/kyclogic/taler-exchange-helper-measure-tops-3rdparty-check | 5++++-
Msrc/kyclogic/taler-exchange-helper-measure-tops-kyx-check | 5++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-3rdparty-check b/src/kyclogic/taler-exchange-helper-measure-tops-3rdparty-check @@ -107,6 +107,7 @@ in ;; esac +NEW_MEASURES="null" # Check high-level case case "$FORM" in @@ -128,6 +129,7 @@ in # Force user to fill in $FORM NEW_RULES=$(echo "$CURRENT_RULES" | jq '(.rules[] |= if (.rule_name=="deposit-limit-zero" or .measures[0] == "form-vqf-902.11") then .measures=["form-'${FORM}'"] else . end)') INVESTIGATE="false" + NEW_MEASURES='"form-vqf-902.11"' ;; esac @@ -139,7 +141,8 @@ jq -n \ --argjson et "$EXPIRATION_TIME" \ --argjson sm "$SUCCESSOR_MEASURE" \ --argjson cm "$CUSTOM_MEASURES" \ + --argjson nm "$NEW_MEASURES" \ --argjson nr "$NEW_RULES" \ - '{"to_investigate":$inv,"new_rules":($nr+{"expiration_time":$et,"successor_measure":$sm,"custom_measures":({}+$nr.custom_measures+$cm)})}|del(..|nulls)' + '{"to_investigate":$inv,"new_measures":$nm,"new_rules":($nr+{"expiration_time":$et,"successor_measure":$sm,"custom_measures":({}+$nr.custom_measures+$cm)})}|del(..|nulls)' exit 0 diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-kyx-check b/src/kyclogic/taler-exchange-helper-measure-tops-kyx-check @@ -120,6 +120,7 @@ in ;; esac +NEW_MEASURES="null" # Check high-level case case "$FORM" in @@ -140,6 +141,7 @@ in # Force user to fill in $FORM NEW_RULES=$(echo "$CURRENT_RULES" | jq '(.rules[] |= if (.measures[0]=="kyx") then .measures=["form-'${FORM}'"] else . end)') INVESTIGATE="false" + NEW_MEASURES='"form-'${FORM}'"' ;; esac @@ -155,7 +157,8 @@ jq -n \ --argjson inv "$INVESTIGATE" \ --argjson et "$EXPIRATION_TIME" \ --argjson sm "$SUCCESSOR_MEASURE" \ + --argjson nm "$NEW_MEASURES" \ --argjson nr "$NEW_RULES" \ - '{"to_investigate":$inv,"new_rules":($nr+{"expiration_time":$et,"successor_measure":$sm,"custom_measures":({}+$nr.custom_measures)})}|del(..|nulls)' + '{"to_investigate":$inv,"new_measures":nm,"new_rules":($nr+{"expiration_time":$et,"successor_measure":$sm,"custom_measures":({}+$nr.custom_measures)})}|del(..|nulls)' exit 0