summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-04-18 21:23:25 +0200
committerFlorian Dold <florian@dold.me>2022-04-18 21:23:48 +0200
commit68b4d0c4de7df98190fcc07c11fa809622b27bfc (patch)
tree6595879e6040e81564f0daac3eb6f71bc5afcbc0 /packages/taler-wallet-core/src
parentdc2c2b36501b24c7f2ed8f3dd0f7e6edc9dd6658 (diff)
downloadwallet-core-68b4d0c4de7df98190fcc07c11fa809622b27bfc.tar.gz
wallet-core-68b4d0c4de7df98190fcc07c11fa809622b27bfc.tar.bz2
wallet-core-68b4d0c4de7df98190fcc07c11fa809622b27bfc.zip
wallet-cli: allow generating segwit addresses
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index 6d45599dc..66bfd6b91 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -1016,6 +1016,15 @@ export async function getExchangeWithdrawalInfo(
instructedAmount,
denoms,
);
+
+ if (selectedDenoms.selectedDenoms.length === 0) {
+ throw Error(
+ `unable to withdraw from ${exchangeBaseUrl}, can't select denominations for instructed amount (${Amounts.stringify(
+ instructedAmount,
+ )}`,
+ );
+ }
+
const exchangeWireAccounts: string[] = [];
for (const account of exchangeDetails.wireInfo.accounts) {
exchangeWireAccounts.push(account.payto_uri);