From 61587dbb0c7d199550f4124389e4952614a2ac95 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 9 Sep 2024 17:35:16 +0200 Subject: wallet-core: return withdrawal tx details, even without exchange --- packages/taler-wallet-core/src/withdraw.ts | 31 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'packages') 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); -- cgit v1.2.3