From 20611fe6e01657d79b2436a25212a6cfc83d4850 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 4 Aug 2021 18:14:37 +0200 Subject: [PATCH] linting --- packages/taler-wallet-cli/src/index.ts | 4 ++-- packages/taler-wallet-cli/src/lint.ts | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index f21e98f0a..3afbc87e5 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -897,13 +897,13 @@ deploymentCli out += "\n"; while (Amounts.cmp(x, max) < 0) { - out += `[COIN_${currency}_${n}]\n`; + out += `[COIN-${currency}_${n}]\n`; out += `VALUE = ${Amounts.stringify(x)}\n`; out += `DURATION_WITHDRAW = 7 days\n`; out += `DURATION_SPEND = 2 years\n`; out += `DURATION_LEGAL = 6 years\n`; out += `FEE_WITHDRAW = ${currency}:0\n`; - out += `FEE_DEPOSIT = ${currency}:0\n`; + out += `FEE_DEPOSIT = ${Amounts.stringify(min)}\n`; out += `FEE_REFRESH = ${currency}:0\n`; out += `FEE_REFUND = ${currency}:0\n`; out += `RSA_KEYSIZE = 2048\n`; diff --git a/packages/taler-wallet-cli/src/lint.ts b/packages/taler-wallet-cli/src/lint.ts index 4913d2ab5..4f6b4d605 100644 --- a/packages/taler-wallet-cli/src/lint.ts +++ b/packages/taler-wallet-cli/src/lint.ts @@ -138,9 +138,11 @@ function checkCoinConfig(cfg: Configuration, basic: BasicConf): void { // FIXME: check that section is well-formed } - console.log( - "error: no coin denomination configured, please configure [coin_*] sections", - ); + if (numCoins == 0) { + console.log( + "error: no coin denomination configured, please configure [coin-*] sections", + ); + } } function checkWireConfig(cfg: Configuration): void { @@ -231,7 +233,6 @@ export async function checkExchangeHttpd( console.log( "warning: section EXCHANGE option BASE_URL: it is recommended to serve the exchange via HTTPS", ); - process.exit(1); } { @@ -265,7 +266,9 @@ export async function checkExchangeHttpd( ); if (keys.master_public_key !== pubConf.masterPublicKey) { - console.log("error: master public key of exchange does not match public key of live exchange"); + console.log( + "error: master public key of exchange does not match public key of live exchange", + ); } } }