exchange

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

commit d290d308d752159e48fe62873d3b1d5dd82f851c
parent cfafc30555e6d14fa0258b12097681b65003de77
Author: Florian Dold <florian@dold.me>
Date:   Fri, 13 Dec 2024 13:21:38 +0100

use currency from config in freeze helper

Diffstat:
Msrc/kyclogic/taler-exchange-helper-measure-freeze | 20++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/kyclogic/taler-exchange-helper-measure-freeze b/src/kyclogic/taler-exchange-helper-measure-freeze @@ -87,12 +87,16 @@ fi # New rules apply for 30 days. EXPIRATION=$((3600 * 30 + $(date +%s))) +# Read currency from the config +CURRENCY=$(taler-exchange-config -c "$CONF" -s exchange -o currency) + # Finally, output the new rules. # See https://docs.taler.net/taler-kyc-manual.html#tsref-type-AmlOutcome # for the required output format. jq -n \ --argjson expiration "$EXPIRATION" \ + --arg currency "$CURRENCY" \ '{ "to_investigate": true, "new_rules" : { "new_measures" : "info-frozen", @@ -101,7 +105,7 @@ jq -n \ "rules" : [ { "operation_type": "WITHDRAW", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -110,7 +114,7 @@ jq -n \ }, { "operation_type": "DEPOSIT", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -119,7 +123,7 @@ jq -n \ }, { "operation_type": "AGGREGATE", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -128,7 +132,7 @@ jq -n \ }, { "operation_type": "MERGE", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -137,7 +141,7 @@ jq -n \ }, { "operation_type": "BALANCE", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -146,7 +150,7 @@ jq -n \ }, { "operation_type": "CLOSE", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -155,7 +159,7 @@ jq -n \ }, { "operation_type": "TRANSACTION", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1, @@ -164,7 +168,7 @@ jq -n \ }, { "operation_type": "REFUND", - "threshold" : "EUR:0", + "threshold" : "\($currency):0", "timeframe" : { "d_us" : 3600000000 }, "measures" : [ "verboten" ], "display_priority" : 1,