Replace Ethereum with Nitro

This commit is contained in:
IshaVenikar 2024-07-16 14:01:05 +05:30
parent 2c46316ad0
commit 0fb92f0ef6
4 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
# testnet-onboarding-app # testnet-onboarding-app
React app for onboarding participants to laconicd chain with Ethereum/Cosmos key attestation React app for onboarding participants to laconicd chain with Nitro/Cosmos key attestation
## Setup for testnet-onboarding-app ## Setup for testnet-onboarding-app

View File

@ -2,7 +2,7 @@ import React from "react";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import ConnectWallet from "./pages/ConnectWallet"; import ConnectWallet from "./pages/ConnectWallet";
import SignWithEthereum from "./pages/SignWithEthereum"; import SignWithNitroKey from "./pages/SignWithNitroKey";
import SignWithCosmos from "./pages/SignWithCosmos"; import SignWithCosmos from "./pages/SignWithCosmos";
import PageNotFound from "./pages/PageNotFound"; import PageNotFound from "./pages/PageNotFound";
import OnboardingSuccess from "./pages/OnboardingSuccess"; import OnboardingSuccess from "./pages/OnboardingSuccess";
@ -16,7 +16,7 @@ function App() {
<Routes> <Routes>
<Route path="/" element={<ConnectWallet />} /> <Route path="/" element={<ConnectWallet />} />
<Route element={<SignPageLayout />}> <Route element={<SignPageLayout />}>
<Route path="/sign-with-ethereum" element={<SignWithEthereum />} /> <Route path="/sign-with-nitro-key" element={<SignWithNitroKey />} />
<Route <Route
path="/sign-with-cosmos/:cosmosAddress/:ethSignature" path="/sign-with-cosmos/:cosmosAddress/:ethSignature"
element={<SignWithCosmos />} element={<SignWithCosmos />}

View File

@ -12,7 +12,7 @@ const ConnectWallet = () => {
useEffect(() => { useEffect(() => {
if (session) { if (session) {
navigate("/sign-with-ethereum"); navigate("/sign-with-nitro-key");
} }
}, [session, navigate]); }, [session, navigate]);

View File

@ -14,7 +14,7 @@ import { utf8ToHex } from "@walletconnect/encoding";
import { useWalletConnectContext } from "../context/WalletConnectContext"; import { useWalletConnectContext } from "../context/WalletConnectContext";
const SignWithEthereum = () => { const SignWithNitroKey = () => {
const { session, signClient, checkPersistedState } = const { session, signClient, checkPersistedState } =
useWalletConnectContext(); useWalletConnectContext();
@ -78,7 +78,7 @@ const SignWithEthereum = () => {
gap: "10px", gap: "10px",
}} }}
> >
<Typography variant="h5">Sign with ethereum key</Typography> <Typography variant="h5">Sign with Nitro key</Typography>
<Typography variant="body1">Select Cosmos account:</Typography> <Typography variant="body1">Select Cosmos account:</Typography>
<Select <Select
labelId="demo-simple-select-label" labelId="demo-simple-select-label"
@ -95,7 +95,7 @@ const SignWithEthereum = () => {
</MenuItem> </MenuItem>
))} ))}
</Select> </Select>
<Typography variant="body1">Select Ethereum account: </Typography> <Typography variant="body1">Select Nitro account: </Typography>
<Select <Select
labelId="demo-simple-select-label" labelId="demo-simple-select-label"
id="demo-simple-select" id="demo-simple-select"
@ -129,7 +129,7 @@ const SignWithEthereum = () => {
style={{ marginTop: "20px" }} style={{ marginTop: "20px" }}
loading={isLoading} loading={isLoading}
> >
Sign using Ethereum key Sign using Nitro key
</LoadingButton> </LoadingButton>
</Box> </Box>
<SnackbarProvider /> <SnackbarProvider />
@ -141,4 +141,4 @@ const SignWithEthereum = () => {
); );
}; };
export default SignWithEthereum; export default SignWithNitroKey;