From ce75d59dfa2fb4c5bc2655177dfd7299532b34ea Mon Sep 17 00:00:00 2001 From: Kyle Huang Junyuan Date: Tue, 18 Jun 2024 18:01:09 +0800 Subject: [PATCH] feat: implement v4 diagose and wrap --- src/views/diagnose.tsx | 11 +++++++++-- src/views/wrap.tsx | 21 +++++++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/views/diagnose.tsx b/src/views/diagnose.tsx index a7661dd..cc8708c 100644 --- a/src/views/diagnose.tsx +++ b/src/views/diagnose.tsx @@ -2,8 +2,7 @@ import { utils } from "@govtechsg/open-attestation"; import React, { useEffect, useState } from "react"; import { FailedAlert, SucceedAlert } from "../components/alert"; -// sad not exported :( -type Version = "2.0" | "3.0"; +type Version = utils.Version; type Kind = "wrapped" | "signed"; export const Diagnose: React.FunctionComponent = () => { const [rawDocument, setRawDocument] = useState(""); @@ -51,6 +50,14 @@ export const Diagnose: React.FunctionComponent = () => { > v3.0 +
+