From b0741a8d074bba31259209c5c26024633c120487 Mon Sep 17 00:00:00 2001 From: lukachi Date: Tue, 17 Sep 2024 14:57:41 +0300 Subject: [PATCH] fix deep links url --- src/pages/QueryIdentity/index.tsx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/pages/QueryIdentity/index.tsx b/src/pages/QueryIdentity/index.tsx index 8f3de76..ceae7bc 100644 --- a/src/pages/QueryIdentity/index.tsx +++ b/src/pages/QueryIdentity/index.tsx @@ -1,6 +1,5 @@ import { JsonApiClient } from '@distributedlab/jac' -import { Accordion, AccordionDetails, AccordionSummary, Button, Stack } from '@mui/material' -import { Buffer } from 'buffer' +import { Accordion, AccordionDetails, AccordionSummary, Button, Link, Stack } from '@mui/material' import { useCallback, useState } from 'react' import { QRCode } from 'react-qrcode-logo' import { v4 as uuid } from 'uuid' @@ -48,9 +47,14 @@ export default function QueryIdentity() { setQrCode(requestPayload) - setDeepLink( - 'https://app.stage.rarime.com/external/' + Buffer.from(requestPayload).toString('base64'), - ) + const newUrl = new URL('rarime://external') + newUrl.searchParams.append('type', 'QueryProofGen') + newUrl.searchParams.append('id', data.id) + newUrl.searchParams.append('data_url', data.get_proof_params) + + const deepLink = newUrl.href + + setDeepLink(deepLink) }, []) const fetchResponse = useCallback(async () => { @@ -87,6 +91,16 @@ export default function QueryIdentity() { + + + {deepLink} +