chore: add dm mono
This commit is contained in:
parent
31485dbf2f
commit
ad58396538
@ -1,20 +1,23 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta
|
<meta name="description" content="Testnet Onboarding App" />
|
||||||
name="description"
|
|
||||||
content="Testnet Onboarding App"
|
|
||||||
/>
|
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||||
<!--
|
<!--
|
||||||
manifest.json provides metadata used when your web app is installed on a
|
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/
|
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="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.
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
@ -61,8 +64,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root">
|
<div id="root">
|
||||||
<div class="loader-wrapper">
|
<div class="loader-wrapper">
|
||||||
@ -79,5 +83,6 @@
|
|||||||
To begin the development, run `npm start` or `yarn start`.
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
-->
|
-->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -3,22 +3,15 @@ import { useLocation, useNavigate } from "react-router-dom";
|
|||||||
import { enqueueSnackbar } from "notistack";
|
import { enqueueSnackbar } from "notistack";
|
||||||
import canonicalStringify from "canonical-json";
|
import canonicalStringify from "canonical-json";
|
||||||
|
|
||||||
import {
|
import { Select, MenuItem, Box, Typography } from "@mui/material";
|
||||||
Select,
|
import LoadingButton from "@mui/lab/LoadingButton";
|
||||||
MenuItem,
|
|
||||||
Box,
|
|
||||||
Typography,
|
|
||||||
} from "@mui/material";
|
|
||||||
import LoadingButton from '@mui/lab/LoadingButton';
|
|
||||||
import { utf8ToHex } from "@walletconnect/encoding";
|
import { utf8ToHex } from "@walletconnect/encoding";
|
||||||
|
|
||||||
import { useWalletConnectContext } from "../context/WalletConnectContext";
|
import { useWalletConnectContext } from "../context/WalletConnectContext";
|
||||||
import { ENABLE_KYC, HASHED_SUBSCRIBER_ID_KEY } from "../constants";
|
import { ENABLE_KYC, HASHED_SUBSCRIBER_ID_KEY } from "../constants";
|
||||||
|
|
||||||
const SignWithNitroKey = () => {
|
const SignWithNitroKey = () => {
|
||||||
|
const { session, signClient, isSessionLoading } = useWalletConnectContext();
|
||||||
const { session, signClient, isSessionLoading } =
|
|
||||||
useWalletConnectContext();
|
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
@ -42,14 +35,17 @@ const SignWithNitroKey = () => {
|
|||||||
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
const subscriberIdHash = useMemo(()=>{
|
const subscriberIdHash = useMemo(() => {
|
||||||
return localStorage.getItem(HASHED_SUBSCRIBER_ID_KEY);
|
return localStorage.getItem(HASHED_SUBSCRIBER_ID_KEY);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!subscriberIdHash) {
|
if (!subscriberIdHash) {
|
||||||
setIsLoading(false);
|
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]);
|
}, [subscriberIdHash]);
|
||||||
|
|
||||||
@ -65,7 +61,9 @@ const SignWithNitroKey = () => {
|
|||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
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 jsonMessage = canonicalStringify(message);
|
||||||
const hexMsg = utf8ToHex(jsonMessage, true);
|
const hexMsg = utf8ToHex(jsonMessage, true);
|
||||||
@ -150,15 +148,19 @@ const SignWithNitroKey = () => {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
{(Boolean(ethAddress) && Boolean(cosmosAddress)) && (<Box
|
{Boolean(ethAddress) && Boolean(cosmosAddress) && (
|
||||||
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: "lightgray",
|
backgroundColor: "lightgray",
|
||||||
padding: 3,
|
padding: 3,
|
||||||
wordWrap: "break-word",
|
wordWrap: "break-word",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<pre style={{ whiteSpace: "pre-wrap", margin: 0 }}>{canonicalStringify(message, null, 2)} </pre>
|
<pre style={{ whiteSpace: "pre-wrap", margin: 0 }}>
|
||||||
</Box>)}
|
{canonicalStringify(message, null, 2)}{" "}
|
||||||
|
</pre>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
<Box>
|
<Box>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
Loading…
Reference in New Issue
Block a user