summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMS <ms@taler.net>2023-12-06 00:27:38 +0100
committerMS <ms@taler.net>2023-12-06 00:27:38 +0100
commitdfc22fd6e910f4c1232156e669fbb6ba107cbcec (patch)
treec154f264832537fdeee348646370f703d90b003e
parent8d3d8e2529a883cc66ea6e7263d7b32cfa182f2b (diff)
downloaddeployment-dfc22fd6e910f4c1232156e669fbb6ba107cbcec.tar.gz
deployment-dfc22fd6e910f4c1232156e669fbb6ba107cbcec.tar.bz2
deployment-dfc22fd6e910f4c1232156e669fbb6ba107cbcec.zip
setup conversion figures
-rwxr-xr-xnetzbon/config_libeufin_bank.sh29
-rwxr-xr-xnetzbon/setup-exchange.sh2
2 files changed, 30 insertions, 1 deletions
diff --git a/netzbon/config_libeufin_bank.sh b/netzbon/config_libeufin_bank.sh
index ad3d66d..2e4dd76 100755
--- a/netzbon/config_libeufin_bank.sh
+++ b/netzbon/config_libeufin_bank.sh
@@ -97,3 +97,32 @@ fi
say "Start the bank..."
systemctl enable --now libeufin-bank
+
+say "Waiting for the bank (/config)..."
+curl --max-time 2 \
+ --retry-all-errors \
+ --retry-delay 1 \
+ --retry 10 \
+ "${EXCHANGE_BASE_URL}"config &>/dev/null
+say "DONE"
+curl -i ${PROTO}://bank.${DOMAIN_NAME}/config \
+
+say "Setting conversion figures..."
+
+-u "admin:${BANK_ADMIN_PASSWORD}" \
+-H 'Content-Type: application/json; charset=utf-8' \
+--data-binary @- << EOF
+{
+ "cashin_ratio": "1",
+ "cashin_fee": "${CURRENCY}:0",
+ "cashin_tiny_amount": "${CURRENCY}:0",
+ "cashin_rounding_mode": "nearest",
+ "cashin_min_amount": "${FIAT_CURRENCY}:1",
+ "cashout_ratio": "1",
+ "cashout_fee": "${FIAT_CURRENCY}:0",
+ "cashout_tiny_amount": "${FIAT_CURRENCY}:0",
+ "cashout_rounding_mode": "zero",
+ "cashout_min_amount": "${CURRENCY}:1"
+}
+EOF
+say "DONE"
diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh
index cb7de54..4061e78 100755
--- a/netzbon/setup-exchange.sh
+++ b/netzbon/setup-exchange.sh
@@ -186,7 +186,7 @@ systemctl enable --now taler-exchange.target
say "Waiting for exchange HTTP service (/config)..."
curl --max-time 2 \
- --retry-connrefused \
+ --retry-all-errors \
--retry-delay 1 \
--retry 10 \
"${EXCHANGE_BASE_URL}"config &>/dev/null