Skip to content

Commit

Permalink
feat: Pass jwt for verification (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Mar 17, 2023
2 parents 1635fb0 + c617edc commit 345f94f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/screens/Identity/Identity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const Identity = (): JSX.Element => {
const pres = await createPresentation(subjectDid, creds)
setPresentation(pres)
const jwt: string = pres.proof.jwt
if (jwt.length > 3500) {
if (jwt.length > 3000) {
setPresQR(await postJWT(jwt))
} else {
setPresQR(jwt)
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Identity/components/CredentialCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const CredentialCard: React.FC<Props> = ({
const handleVerifyCredential = async (credential: VerifiableCredential) => {
const uri = `${import.meta.env.VITE_ISSUER_ENDPOINT}/api/credentials/verify`;
setState({ isVerified: CredentialVerificationState.InProgress })
axios.post(uri, { credential }).then((resp: { data: { verified: boolean }, status: number }) => {
axios.post(uri, { credential: credential.proof.jwt }).then((resp: { data: { verified: boolean }, status: number }) => {
if (resp.data.verified) {
setState({ isVerified: CredentialVerificationState.Success })
return
Expand Down

0 comments on commit 345f94f

Please sign in to comment.