aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-06-05 10:58:24 -0300
committerSebastian <sebasjm@gmail.com>2023-06-05 10:58:24 -0300
commit75fdf6137fb465d6c6c72b997bc899459f3de66e (patch)
treea239d9f0f0599a96f789b24173820f077f254b8b /packages/taler-wallet-webextension/src/wallet/Transaction.tsx
parent16900104b57036ceb4eac61891d9ff5679b4737a (diff)
downloadwallet-core-75fdf6137fb465d6c6c72b997bc899459f3de66e.tar.xz
move kycurl to commons, make webex aware
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.tsx67
1 files changed, 39 insertions, 28 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index d198893cd..f5ffe4221 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -25,12 +25,14 @@ import {
parsePaytoUri,
PaytoUri,
stringifyPaytoUri,
+ TalerErrorCode,
TalerPreciseTimestamp,
TalerProtocolTimestamp,
Transaction,
TransactionDeposit,
TransactionIdStr,
TransactionMajorState,
+ TransactionMinorState,
TransactionType,
TranslatedString,
WithdrawalType,
@@ -259,35 +261,44 @@ function TransactionTemplate({
return (
<Fragment>
<section style={{ padding: 8, textAlign: "center" }}>
- {transaction?.error ? (
- transaction.error.code === 7025 ? (
- <AlertView
- alert={{
- type: "warning",
- message: i18n.str`KYC check required for the transaction to complete`,
- description:
- transaction.error.kycUrl &&
- typeof transaction.error.kycUrl === "string" ? (
- <div>
- <i18n.Translate>
- Follow this link to the{` `}
- <a href={transaction.error.kycUrl}>KYC verifier</a>
- </i18n.Translate>
- </div>
- ) : (
- i18n.str`No more information has been provided`
- ),
- }}
- />
- ) : (
- <ErrorAlertView
- error={alertFromError(
- i18n.str`There was an error trying to complete the transaction`,
- transaction.error,
- )}
- />
- )
+ {transaction?.error &&
+ // FIXME: wallet core should stop sending this error on KYC
+ transaction.error.code !==
+ TalerErrorCode.WALLET_WITHDRAWAL_KYC_REQUIRED ? (
+ <ErrorAlertView
+ error={alertFromError(
+ i18n.str`There was an error trying to complete the transaction`,
+ transaction.error,
+ )}
+ />
) : undefined}
+ {transaction.txState.minor === TransactionMinorState.KycRequired && (
+ <AlertView
+ alert={{
+ type: "warning",
+ message: i18n.str`KYC check required for the transaction to complete`,
+ description:
+ transaction.kycUrl && typeof transaction.kycUrl === "string" ? (
+ <div>
+ <i18n.Translate>
+ Follow this link to the{` `}
+ <a href={transaction.kycUrl}>KYC verifier</a>
+ </i18n.Translate>
+ </div>
+ ) : (
+ i18n.str`No more information has been provided`
+ ),
+ }}
+ />
+ )}
+ {transaction.txState.minor === TransactionMinorState.AmlRequired && (
+ <WarningBox>
+ <i18n.Translate>
+ The transaction has been blocked since the account required an AML
+ check
+ </i18n.Translate>
+ </WarningBox>
+ )}
{transaction.txState.major === TransactionMajorState.Pending && (
<WarningBox>
<i18n.Translate>This transaction is not completed</i18n.Translate>