feat: create kyc page with api
This commit is contained in:
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -5,7 +5,7 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>ЭКСА — Ваш мост в мир цифровых активов</title>
|
<title>ЭКСА — Ваш мост в мир цифровых активов</title>
|
||||||
<script type="module" crossorigin src="/assets/index-D7QcZmDu.js"></script>
|
<script type="module" crossorigin src="/assets/index-Hdj79d7b.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-3J8Zo9Sf.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-3J8Zo9Sf.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ export function kycCreate(): Promise<KycResponse> {
|
|||||||
|
|
||||||
async function doKycRequest(allowRetry: boolean): Promise<KycResponse> {
|
async function doKycRequest(allowRetry: boolean): Promise<KycResponse> {
|
||||||
const csrf = await getCsrfToken()
|
const csrf = await getCsrfToken()
|
||||||
const bearer = tokenStore.get()
|
|
||||||
|
|
||||||
const res = await fetch(`${KYC_API_URL}/kyc/create`, {
|
const res = await fetch(`${KYC_API_URL}/kyc/create`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -26,13 +25,10 @@ async function doKycRequest(allowRetry: boolean): Promise<KycResponse> {
|
|||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-CSRF-Token': csrf,
|
'X-CSRF-Token': csrf,
|
||||||
...(bearer ? { Authorization: `Bearer ${bearer}` } : {}),
|
|
||||||
},
|
},
|
||||||
body: JSON.stringify({}),
|
body: JSON.stringify({}),
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(res)
|
|
||||||
|
|
||||||
if (res.status === 401 && allowRetry) {
|
if (res.status === 401 && allowRetry) {
|
||||||
try {
|
try {
|
||||||
await refreshAccessToken()
|
await refreshAccessToken()
|
||||||
|
|||||||
Reference in New Issue
Block a user