feat: create kyc page with api
This commit is contained in:
@@ -18,7 +18,6 @@ export function kycCreate(): Promise<KycResponse> {
|
||||
|
||||
async function doKycRequest(allowRetry: boolean): Promise<KycResponse> {
|
||||
const csrf = await getCsrfToken()
|
||||
const bearer = tokenStore.get()
|
||||
|
||||
const res = await fetch(`${KYC_API_URL}/kyc/create`, {
|
||||
method: 'POST',
|
||||
@@ -26,13 +25,10 @@ async function doKycRequest(allowRetry: boolean): Promise<KycResponse> {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRF-Token': csrf,
|
||||
...(bearer ? { Authorization: `Bearer ${bearer}` } : {}),
|
||||
},
|
||||
body: JSON.stringify({}),
|
||||
})
|
||||
|
||||
console.log(res)
|
||||
|
||||
if (res.status === 401 && allowRetry) {
|
||||
try {
|
||||
await refreshAccessToken()
|
||||
|
||||
Reference in New Issue
Block a user