chore: add dm mono

This commit is contained in:
Cody Bender 2024-08-09 16:59:58 -04:00
parent 31485dbf2f
commit ad58396538
2 changed files with 87 additions and 80 deletions

View File

@ -1,20 +1,23 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Testnet Onboarding App"
/>
<meta name="description" content="Testnet Onboarding App" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap"
rel="stylesheet" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
@ -62,6 +65,7 @@
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root">
@ -80,4 +84,5 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

View File

@ -3,22 +3,15 @@ import { useLocation, useNavigate } from "react-router-dom";
import { enqueueSnackbar } from "notistack";
import canonicalStringify from "canonical-json";
import {
Select,
MenuItem,
Box,
Typography,
} from "@mui/material";
import LoadingButton from '@mui/lab/LoadingButton';
import { Select, MenuItem, Box, Typography } from "@mui/material";
import LoadingButton from "@mui/lab/LoadingButton";
import { utf8ToHex } from "@walletconnect/encoding";
import { useWalletConnectContext } from "../context/WalletConnectContext";
import { ENABLE_KYC, HASHED_SUBSCRIBER_ID_KEY } from "../constants";
const SignWithNitroKey = () => {
const { session, signClient, isSessionLoading } =
useWalletConnectContext();
const { session, signClient, isSessionLoading } = useWalletConnectContext();
const navigate = useNavigate();
const location = useLocation();
@ -49,7 +42,10 @@ const SignWithNitroKey = () => {
useEffect(() => {
if (!subscriberIdHash) {
setIsLoading(false);
enqueueSnackbar("Subscriber ID not found. Please verify your email and try again", { variant: "error" });
enqueueSnackbar(
"Subscriber ID not found. Please verify your email and try again",
{ variant: "error" },
);
}
}, [subscriberIdHash]);
@ -65,7 +61,9 @@ const SignWithNitroKey = () => {
try {
setIsLoading(true);
enqueueSnackbar("View and sign the message from your Laconic Wallet", { variant: "info" });
enqueueSnackbar("View and sign the message from your Laconic Wallet", {
variant: "info",
});
const jsonMessage = canonicalStringify(message);
const hexMsg = utf8ToHex(jsonMessage, true);
@ -150,15 +148,19 @@ const SignWithNitroKey = () => {
))}
</Select>
{(Boolean(ethAddress) && Boolean(cosmosAddress)) && (<Box
{Boolean(ethAddress) && Boolean(cosmosAddress) && (
<Box
sx={{
backgroundColor: "lightgray",
padding: 3,
wordWrap: "break-word",
}}
>
<pre style={{ whiteSpace: "pre-wrap", margin: 0 }}>{canonicalStringify(message, null, 2)} </pre>
</Box>)}
<pre style={{ whiteSpace: "pre-wrap", margin: 0 }}>
{canonicalStringify(message, null, 2)}{" "}
</pre>
</Box>
)}
<Box>
<LoadingButton
variant="contained"