diff options
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index f3b205211..ee6b93381 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -21,6 +21,7 @@ import { AbsoluteTime, addPaytoQueryParams, AgeRestriction, + AmountString, codecForList, codecForString, CoreApiResponse, @@ -592,7 +593,7 @@ withdrawCli withdrawCli .subcommand("withdrawCheckAmount", "check-amount") .requiredArgument("exchange", clk.STRING) - .requiredArgument("amount", clk.STRING) + .requiredArgument("amount", clk.AMOUNT) .maybeOption("restrictAge", ["--restrict-age"], clk.INT) .action(async (args) => { const restrictAge = args.withdrawCheckAmount.restrictAge; @@ -728,7 +729,7 @@ withdrawCli .requiredOption("exchange", ["--exchange"], clk.STRING, { help: "Base URL of the exchange.", }) - .requiredOption("amount", ["--amount"], clk.STRING, { + .requiredOption("amount", ["--amount"], clk.AMOUNT, { help: "Amount to withdraw", }) .maybeOption("restrictAge", ["--restrict-age"], clk.INT) @@ -960,7 +961,7 @@ const depositCli = walletCli.subcommand("depositArgs", "deposit", { depositCli .subcommand("createDepositArgs", "create") - .requiredArgument("amount", clk.STRING) + .requiredArgument("amount", clk.AMOUNT) .requiredArgument("targetPayto", clk.STRING) .action(async (args) => { await withLocalWallet(args, async (wallet) => { @@ -984,7 +985,7 @@ peerCli .subcommand("checkPayPush", "check-push-debit", { help: "Check fees for starting a peer-push debit transaction.", }) - .requiredArgument("amount", clk.STRING, { + .requiredArgument("amount", clk.AMOUNT, { help: "Amount to pay", }) .action(async (args) => { @@ -1003,7 +1004,7 @@ peerCli .subcommand("checkPayPull", "check-pull-credit", { help: "Check fees for a starting peer-pull credit transaction.", }) - .requiredArgument("amount", clk.STRING, { + .requiredArgument("amount", clk.AMOUNT, { help: "Amount to request", }) .action(async (args) => { @@ -1067,7 +1068,7 @@ peerCli .subcommand("initiatePayPull", "initiate-pull-credit", { help: "Initiate a peer-pull payment.", }) - .requiredArgument("amount", clk.STRING, { + .requiredArgument("amount", clk.AMOUNT, { help: "Amount to request", }) .maybeOption("summary", ["--summary"], clk.STRING, { @@ -1125,7 +1126,7 @@ peerCli .subcommand("payPush", "initiate-push-debit", { help: "Initiate a peer-push payment.", }) - .requiredArgument("amount", clk.STRING, { + .requiredArgument("amount", clk.AMOUNT, { help: "Amount to pay", }) .maybeOption("summary", ["--summary"], clk.STRING, { @@ -1239,7 +1240,7 @@ advancedCli help: "Initialize the wallet (with DB) and exit.", }) .action(async (args) => { - await withWallet(args, async () => {}); + await withWallet(args, async () => { }); }); advancedCli @@ -1278,8 +1279,8 @@ advancedCli const wallet = res.wallet; await wallet.client.call(WalletApiOperation.InitWallet, {}); await wallet.client.call(WalletApiOperation.RunIntegrationTest, { - amountToSpend: "TESTKUDOS:1", - amountToWithdraw: "TESTKUDOS:3", + amountToSpend: "TESTKUDOS:1" as AmountString, + amountToWithdraw: "TESTKUDOS:3" as AmountString, corebankApiBaseUrl: "http://localhost:8082/taler-bank-access/", exchangeBaseUrl: "http://localhost:8081/", merchantBaseUrl: "http://localhost:8083/", @@ -1506,7 +1507,7 @@ testCli testCli.subcommand("withdrawKudos", "withdraw-kudos").action(async (args) => { await withWallet(args, async (wallet) => { await wallet.client.call(WalletApiOperation.WithdrawTestBalance, { - amount: "KUDOS:50", + amount: "KUDOS:50" as AmountString, corebankApiBaseUrl: "https://bank.demo.taler.net/", exchangeBaseUrl: "https://exchange.demo.taler.net/", |