aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-01-11 15:26:07 -0300
committerSebastian <sebasjm@gmail.com>2023-01-11 15:30:14 -0300
commite87073d42a2f51405d1a1f6be27cb378b552dcdf (patch)
tree841e2b994eae7c91d58ffdbc81d8662e0bda90d7 /packages/taler-wallet-webextension/src/wallet/Transaction.tsx
parent335d22b12b3d8ed1a14d39bf8ca17faade9ca34c (diff)
downloadwallet-core-e87073d42a2f51405d1a1f6be27cb378b552dcdf.tar.xz
add kyc warning
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.tsx35
1 files changed, 28 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index f22f3b4ee..c6fa9ec68 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -44,7 +44,7 @@ import emptyImg from "../../static/img/empty.png";
import { Amount } from "../components/Amount.js";
import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType.js";
import { CopyButton } from "../components/CopyButton.js";
-import { ErrorAlertView } from "../components/CurrentAlerts.js";
+import { AlertView, ErrorAlertView } from "../components/CurrentAlerts.js";
import { Loading } from "../components/Loading.js";
import { Kind, Part, PartCollapsible, PartPayto } from "../components/Part.js";
import { QR } from "../components/QR.js";
@@ -199,12 +199,33 @@ export function TransactionView({
<Fragment>
<section style={{ padding: 8, textAlign: "center" }}>
{transaction?.error ? (
- <ErrorAlertView
- error={alertFromError(
- i18n.str`There was an error trying to complete the transaction`,
- 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,
+ )}
+ />
+ )
) : undefined}
{transaction.pending && (
<WarningBox>