fix #7684
This commit is contained in:
parent
2f8de9ea86
commit
00f108b9dd
@ -395,11 +395,16 @@ export namespace MerchantBackend {
|
|||||||
// URL that the user should open in a browser to
|
// URL that the user should open in a browser to
|
||||||
// proceed with the KYC process (as returned
|
// proceed with the KYC process (as returned
|
||||||
// by the exchange's /kyc-check/ endpoint).
|
// by the exchange's /kyc-check/ endpoint).
|
||||||
kyc_url: string;
|
// Optional, missing if the account is blocked
|
||||||
|
// due to AML and not due to KYC.
|
||||||
|
kyc_url?: string;
|
||||||
|
|
||||||
// Base URL of the exchange this is about.
|
// Base URL of the exchange this is about.
|
||||||
exchange_url: string;
|
exchange_url: string;
|
||||||
|
|
||||||
|
// AML status of the account.
|
||||||
|
aml_status: number;
|
||||||
|
|
||||||
// Our bank wire account this is about.
|
// Our bank wire account this is about.
|
||||||
payto_uri: string;
|
payto_uri: string;
|
||||||
}
|
}
|
||||||
|
@ -15,3 +15,4 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * as details from "./details/stories.js";
|
export * as details from "./details/stories.js";
|
||||||
|
export * as kycList from "./kyc/list/ListPage.stories.js";
|
||||||
|
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
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 <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { h, VNode, FunctionalComponent } from "preact";
|
||||||
|
import { ListPage as TestedComponent } from "./ListPage.js";
|
||||||
|
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||||
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: "Pages/KYC/List",
|
||||||
|
component: TestedComponent,
|
||||||
|
argTypes: {
|
||||||
|
onUpdate: { action: "onUpdate" },
|
||||||
|
onBack: { action: "onBack" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Example = tests.createExample(TestedComponent, {
|
||||||
|
status: {
|
||||||
|
timeout_kycs: [],
|
||||||
|
pending_kycs: [
|
||||||
|
{
|
||||||
|
aml_status: 0,
|
||||||
|
exchange_url: "http://exchange.taler",
|
||||||
|
payto_uri: "payto://iban/de123123123",
|
||||||
|
kyc_url: "http://exchange.taler/kyc",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
aml_status: 1,
|
||||||
|
exchange_url: "http://exchange.taler",
|
||||||
|
payto_uri: "payto://iban/de123123123",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
aml_status: 2,
|
||||||
|
exchange_url: "http://exchange.taler",
|
||||||
|
payto_uri: "payto://iban/de123123123",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
} as MerchantBackend.Instances.AccountKycRedirects,
|
||||||
|
});
|
@ -106,23 +106,50 @@ function PendingTable({ entries }: PendingTableProps): VNode {
|
|||||||
<i18n.Translate>Target account</i18n.Translate>
|
<i18n.Translate>Target account</i18n.Translate>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<i18n.Translate>KYC URL</i18n.Translate>
|
<i18n.Translate>Reason</i18n.Translate>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{entries.map((e, i) => {
|
{entries.map((e, i) => {
|
||||||
return (
|
if (e.kyc_url === undefined) {
|
||||||
<tr key={i}>
|
// blocked by AML
|
||||||
<td>{e.exchange_url}</td>
|
return (
|
||||||
<td>{e.payto_uri}</td>
|
<tr key={i}>
|
||||||
<td>
|
<td>{e.exchange_url}</td>
|
||||||
<a href={e.kyc_url} target="_black" rel="noreferrer">
|
<td>{e.payto_uri}</td>
|
||||||
{e.kyc_url}
|
<td>
|
||||||
</a>
|
{e.aml_status === 1 ? (
|
||||||
</td>
|
<i18n.Translate>
|
||||||
</tr>
|
There is an anti-money laundering process pending to
|
||||||
);
|
complete
|
||||||
|
</i18n.Translate>
|
||||||
|
) : (
|
||||||
|
<i18n.Translate>
|
||||||
|
The account is frozen due to the anti-money laundering
|
||||||
|
rules. Contact the exchange service provider for further
|
||||||
|
instructions.
|
||||||
|
</i18n.Translate>
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// blocked by KYC
|
||||||
|
return (
|
||||||
|
<tr key={i}>
|
||||||
|
<td>{e.exchange_url}</td>
|
||||||
|
<td>{e.payto_uri}</td>
|
||||||
|
<td>
|
||||||
|
<a href={e.kyc_url} target="_black" rel="noreferrer">
|
||||||
|
<i18n.Translate>
|
||||||
|
Pending KYC process, click here to complete
|
||||||
|
</i18n.Translate>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
);
|
||||||
|
}
|
||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user