commit 8f3973b300fdbeb722b1692dc5b2817fb3f447e5
parent 89c7ed4bd3d13232bf651c9d1b5420c064b50233
Author: Florian Dold <florian@dold.me>
Date: Wed, 1 Jul 2026 21:02:23 +0200
read currency from config in taler-exchange-helper-measure-test-oauth
Diffstat:
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/kyclogic/taler-exchange-helper-measure-test-oauth b/src/kyclogic/taler-exchange-helper-measure-test-oauth
@@ -100,12 +100,16 @@ echo "$J" >> /dev/null
# 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-exchange-manual.html#tsref-type-AmlOutcome
# for the required output format.
jq -n \
--argjson expiration "$EXPIRATION" \
+ --arg currency "$CURRENCY" \
'{ "to_investigate": false,
"new_rules" : {
"custom_measures" : {},
@@ -113,7 +117,7 @@ jq -n \
"rules" : [
{
"operation_type": "WITHDRAW",
- "threshold" : "EUR:1000",
+ "threshold" : "\($currency):1000",
"timeframe" : { "d_us" : 3600000000 },
"measures" : [ "verboten" ],
"display_priority" : 1,
@@ -122,7 +126,7 @@ jq -n \
},
{
"operation_type": "DEPOSIT",
- "threshold" : "EUR:1000",
+ "threshold" : "\($currency):1000",
"timeframe" : { "d_us" : 3600000000 },
"measures" : [ "verboten" ],
"display_priority" : 1,
@@ -131,7 +135,7 @@ jq -n \
},
{
"operation_type": "AGGREGATE",
- "threshold" : "EUR:1000",
+ "threshold" : "\($currency):1000",
"timeframe" : { "d_us" : 3600000000 },
"measures" : [ "verboten" ],
"display_priority" : 1,
@@ -140,7 +144,7 @@ jq -n \
},
{
"operation_type": "MERGE",
- "threshold" : "EUR:1000",
+ "threshold" : "\($currency):1000",
"timeframe" : { "d_us" : 3600000000 },
"measures" : [ "verboten" ],
"display_priority" : 1,
@@ -149,7 +153,7 @@ jq -n \
},
{
"operation_type": "BALANCE",
- "threshold" : "EUR:1000",
+ "threshold" : "\($currency):1000",
"timeframe" : { "d_us" : 3600000000 },
"measures" : [ "verboten" ],
"display_priority" : 1,
@@ -158,7 +162,7 @@ jq -n \
},
{
"operation_type": "CLOSE",
- "threshold" : "EUR:1000",
+ "threshold" : "\($currency):1000",
"timeframe" : { "d_us" : 3600000000 },
"measures" : [ "verboten" ],
"display_priority" : 1,