commit 61587dbb0c7d199550f4124389e4952614a2ac95
parent 0174bcb85541546671cf703b528d3270baaa586b
Author: Florian Dold <florian@dold.me>
Date: Mon, 9 Sep 2024 17:35:16 +0200
wallet-core: return withdrawal tx details, even without exchange
Diffstat:
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git 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);