aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-09-09 17:35:16 +0200
committerFlorian Dold <florian@dold.me>2024-09-09 17:35:21 +0200
commit61587dbb0c7d199550f4124389e4952614a2ac95 (patch)
tree75478ba9d7ddb506352b5ef6361110d25b48f1bd /packages
parent0174bcb85541546671cf703b528d3270baaa586b (diff)
downloadwallet-core-61587dbb0c7d199550f4124389e4952614a2ac95.tar.xz
wallet-core: return withdrawal tx details, even without exchange
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-core/src/withdraw.ts31
1 files changed, 14 insertions, 17 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts
index 6c9bcac63..c98c16f65 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -364,24 +364,21 @@ export class WithdrawTransactionContext implements TransactionContext {
let kycDetails: TxKycDetails | undefined = undefined;
- if (!exchangeBaseUrl) {
- return undefined;
- }
-
- switch (withdrawalGroupRecord.status) {
- case WithdrawalGroupStatus.PendingKyc:
- case WithdrawalGroupStatus.SuspendedKyc: {
- kycDetails = {
- kycAccessToken: withdrawalGroupRecord.kycAccessToken,
- kycPaytoHash: withdrawalGroupRecord.kycPaytoHash,
- kycUrl: new URL(
- `kyc-spa/${withdrawalGroupRecord.kycAccessToken}`,
- exchangeBaseUrl,
- ).href,
- };
- break;
+ if (exchangeBaseUrl) {
+ switch (withdrawalGroupRecord.status) {
+ case WithdrawalGroupStatus.PendingKyc:
+ case WithdrawalGroupStatus.SuspendedKyc: {
+ kycDetails = {
+ kycAccessToken: withdrawalGroupRecord.kycAccessToken,
+ kycPaytoHash: withdrawalGroupRecord.kycPaytoHash,
+ kycUrl: new URL(
+ `kyc-spa/${withdrawalGroupRecord.kycAccessToken}`,
+ exchangeBaseUrl,
+ ).href,
+ };
+ break;
+ }
}
- // For the balance KYC, the client should get the kycUrl etc. from the exchange entry!
}
const ort = await tx.operationRetries.get(this.taskId);