Skip to content

Commit

Permalink
chore: use new interface and show malformed as an example
Browse files Browse the repository at this point in the history
  • Loading branch information
phanshiyu committed Apr 22, 2024
1 parent 48162e5 commit 3d74e78
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/application/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ReactDOM from "react-dom";
import { rawOpencerts } from "./fixtures/v2/opencerts";
import { certWithBadTemplateName, certWithNoTemplate } from "./fixtures/v2/certs-to-test-default-renderer";
import { driverLicense } from "./fixtures/v3/driverLicense";
import { svgEmbeddedDemoV2, svgHostedDemoV2 } from "./fixtures/v2/svgDemoV2";
import { malformSvgDemoV2, svgEmbeddedDemoV2, svgHostedDemoV2 } from "./fixtures/v2/svgDemoV2";
import React from "react";
import { AppContainer } from "./container";

Expand All @@ -24,6 +24,7 @@ export const App: React.FunctionComponent = (): React.ReactElement => {
{ name: "Driver License (V3)", document: driverLicense, frameSource: "http://localhost:9000" },
{ name: "Legacy (Penpal V4)", document: { id: "legacy" }, frameSource: "http://localhost:8080" },
{ name: "SVG Embedded Demo (V2)", document: svgEmbeddedDemoV2, frameSource: "" },
{ name: "Malformed SVG (V2)", document: malformSvgDemoV2, frameSource: "" },
{ name: "SVG Hosted Demo (V2)", document: svgHostedDemoV2, frameSource: "" },
]}
/>
Expand Down
28 changes: 28 additions & 0 deletions example/application/fixtures/v2/svgDemoV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,34 @@ export const svgEmbeddedDemoV2 = {
},
};

export const malformSvgDemoV2 = {
issuers: [
{
id: "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90",
name: "Government Technology Agency of Singapore (GovTech)",
revocation: {
type: v2.RevocationType.None,
},
identityProof: {
type: v2.IdentityProofType.DNSDid,
location: "example.openattestation.com",
key: "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller",
},
},
],
renderMethod: [
{
id: `<sv.`,
type: "SvgRenderingTemplate2023",
name: "SVG Demo",
},
],
qualification: "SVG rendering",
recipient: {
name: "Yourself",
},
};

export const svgHostedDemoV2 = {
issuers: [
{
Expand Down

0 comments on commit 3d74e78

Please sign in to comment.