/* This file is part of GNU Taler (C) 2021-2023 Taler Systems S.A. GNU Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see */ /** * * @author Sebastian Javier Marchano (sebasjm) */ import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { h, VNode } from "preact"; import { MerchantBackend } from "../../../../declaration.js"; export interface Props { status: MerchantBackend.KYC.AccountKycRedirects; } export function ListPage({ status }: Props): VNode { const { i18n } = useTranslationContext(); return (

Pending KYC verification

{status.pending_kycs.length > 0 ? ( ) : ( )}
{status.timeout_kycs.length > 0 ? (

Timed out

{status.timeout_kycs.length > 0 ? ( ) : ( )}
) : undefined}
); } interface PendingTableProps { entries: MerchantBackend.KYC.MerchantAccountKycRedirect[]; } interface TimedOutTableProps { entries: MerchantBackend.KYC.ExchangeKycTimeout[]; } function PendingTable({ entries }: PendingTableProps): VNode { const { i18n } = useTranslationContext(); return (
{entries.map((e, i) => { if (e.kyc_url === undefined) { // blocked by AML return ( ); } else { // blocked by KYC return ( ); } })}
Exchange Target account Reason
{e.exchange_url} {e.payto_uri} {e.aml_status === 1 ? ( There is an anti-money laundering process pending to complete. ) : ( The account is frozen due to the anti-money laundering rules. Contact the exchange service provider for further instructions. )}
{e.exchange_url} {e.payto_uri} Pending KYC process, click here to complete
); } function TimedOutTable({ entries }: TimedOutTableProps): VNode { const { i18n } = useTranslationContext(); return (
{entries.map((e, i) => { return ( ); })}
Exchange Code Http Status
{e.exchange_url} {e.exchange_code} {e.exchange_http_status}
); } function EmptyTable(): VNode { const { i18n } = useTranslationContext(); return (

No pending kyc verification!

); }