{participant && (
- Laconic Address: {participant.cosmosAddress}
+ Laconic Address: {participant.laconicAddress}
Nitro Address: {participant.nitroAddress}
Role: {participant.role}
KYC ID: {participant.kycId}
@@ -103,11 +103,11 @@ const OnboardingSuccess = () => {
{ENABLE_KYC ? (
KYC Status
- {!loading && token && cosmosAddress && (
+ {!loading && token && laconicAddress && (
{
+const SignWithLaconic = () => {
const { session, signClient } = useWalletConnectContext();
const location = useLocation();
@@ -30,21 +30,21 @@ const SignWithCosmos = () => {
const {
message: innerMessage,
- cosmosAddress,
+ laconicAddress,
receivedEthSig: ethSignature,
} = location.state as {
message?: {
msg: string;
address: string;
};
- cosmosAddress?: string;
+ laconicAddress?: string;
receivedEthSig?: string;
};
const ethAddress = innerMessage!.address;
const subscriberIdHash = localStorage.getItem(HASHED_SUBSCRIBER_ID_KEY);
- const createCosmosClient = useCallback(async (endpoint: string) => {
+ const createLaconicClient = useCallback(async (endpoint: string) => {
return await StargateClient.connect(endpoint);
}, []);
@@ -53,14 +53,14 @@ const SignWithCosmos = () => {
return {
typeUrl: typeUrlMsgOnboardParticipant,
value: {
- participant: cosmosAddress!,
+ participant: laconicAddress!,
ethPayload: innerMessage,
ethSignature: ethSignature!,
kycId: subscriberIdHash!,
role,
},
};
- }, [cosmosAddress, innerMessage, ethSignature, subscriberIdHash, role]);
+ }, [laconicAddress, innerMessage, ethSignature, subscriberIdHash, role]);
const handleTokenRequest = async () => {
try {
@@ -73,7 +73,7 @@ const SignWithCosmos = () => {
"Content-Type": "application/json",
},
body: JSON.stringify({
- address: cosmosAddress,
+ address: laconicAddress,
}),
},
);
@@ -115,7 +115,7 @@ const SignWithCosmos = () => {
variant: "info",
});
- const params = { transactionMessage, signer: cosmosAddress };
+ const params = { transactionMessage, signer: laconicAddress };
const responseFromWallet = await signClient!.request<{
code: number;
}>({
@@ -131,7 +131,7 @@ const SignWithCosmos = () => {
} else {
navigate("/onboarding-success", {
state: {
- cosmosAddress,
+ laconicAddress,
},
});
}
@@ -145,11 +145,11 @@ const SignWithCosmos = () => {
const getBalances = useCallback(async () => {
try {
- const cosmosClient = await createCosmosClient(
+ const cosmosClient = await createLaconicClient(
process.env.REACT_APP_LACONICD_RPC_ENDPOINT!,
);
const balance = await cosmosClient.getBalance(
- cosmosAddress!,
+ laconicAddress!,
process.env.REACT_APP_LACONICD_DENOM!,
);
setBalance(balance.amount);
@@ -157,7 +157,7 @@ const SignWithCosmos = () => {
console.error("Error fetching balance:", error);
throw error;
}
- }, [cosmosAddress, createCosmosClient]);
+ }, [laconicAddress, createLaconicClient]);
useEffect(() => {
getBalances();
@@ -179,7 +179,7 @@ const SignWithCosmos = () => {
Laconic Account:
- Address: {cosmosAddress}
+ Address: {laconicAddress}
Balance: {balance} {process.env.REACT_APP_LACONICD_DENOM}
@@ -219,4 +219,4 @@ const SignWithCosmos = () => {
);
};
-export default SignWithCosmos;
+export default SignWithLaconic;
diff --git a/src/pages/SignWithNitroKey.tsx b/src/pages/SignWithNitroKey.tsx
index 8388962..3451152 100644
--- a/src/pages/SignWithNitroKey.tsx
+++ b/src/pages/SignWithNitroKey.tsx
@@ -33,7 +33,7 @@ const SignWithNitroKey = () => {
const [ethAddress, setEthAddress] = useState("");
const [ethSignature, setEthSignature] = useState("");
- const [cosmosAddress, setCosmosAddress] = useState("");
+ const [laconicAddress, setLaconicAddress] = useState("");
const [isLoading, setIsLoading] = useState(false);
@@ -84,15 +84,15 @@ const SignWithNitroKey = () => {
navigate("/user-verification", {
state: {
message,
- cosmosAddress,
+ laconicAddress,
receivedEthSig,
},
});
} else {
- navigate("/sign-with-cosmos", {
+ navigate("/sign-with-laconic", {
state: {
message,
- cosmosAddress,
+ laconicAddress,
receivedEthSig,
},
});
@@ -113,9 +113,9 @@ const SignWithNitroKey = () => {
- {Boolean(ethAddress) && Boolean(cosmosAddress) && (
+ {Boolean(ethAddress) && Boolean(laconicAddress) && (
{canonicalStringify(message, null, 2)}
)}
diff --git a/src/pages/UserVerification.tsx b/src/pages/UserVerification.tsx
index e2ad450..fb5bcc4 100644
--- a/src/pages/UserVerification.tsx
+++ b/src/pages/UserVerification.tsx
@@ -18,13 +18,13 @@ const UserVerification = () => {
const location = useLocation();
const navigate = useNavigate();
- const {message, cosmosAddress, receivedEthSig} = location.state as {
+ const {message, laconicAddress, receivedEthSig} = location.state as {
message?: string;
- cosmosAddress?: string;
+ laconicAddress?: string;
receivedEthSig?: string;
};
- const userId = cosmosAddress;
+ const userId = laconicAddress;
useEffect(() => {
const getToken = async (userId: string) => {
@@ -46,15 +46,15 @@ const UserVerification = () => {
if (applicationSubmitted && kycId !== '') {
const kycIdHash = ethers.utils.sha256(ethers.utils.toUtf8Bytes(kycId));
- navigate("/sign-with-cosmos", {
+ navigate("/sign-with-laconic", {
state: {
message,
- cosmosAddress,
+ laconicAddress,
receivedEthSig,
kycIdHash
}});
}
- }, [applicationSubmitted, kycId, navigate, cosmosAddress, message, receivedEthSig]);
+ }, [applicationSubmitted, kycId, navigate, laconicAddress, message, receivedEthSig]);
const messageHandler: MessageHandler = (event, payload) => {
console.log('sumsubEvent:', event, payload);
diff --git a/src/pages/Validator.tsx b/src/pages/Validator.tsx
index 5f54d69..3f522eb 100644
--- a/src/pages/Validator.tsx
+++ b/src/pages/Validator.tsx
@@ -25,7 +25,7 @@ const Validator = () => {
const { session, signClient, isSessionLoading } = useWalletConnectContext();
const navigate = useNavigate();
- const [cosmosAddress, setCosmosAddress] = useState("");
+ const [laconicAddress, setLaconicAddress] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [moniker, setMoniker] = useState("");
const [pubKey, setPubKey] = useState("");
@@ -43,7 +43,7 @@ const Validator = () => {
}, [session, navigate, isSessionLoading]);
useEffect(() => {
- if (!cosmosAddress) {
+ if (!laconicAddress) {
setParticipant(null);
return;
}
@@ -55,7 +55,7 @@ const Validator = () => {
try {
const fetchedParticipant =
- await registry.getParticipantByAddress(cosmosAddress);
+ await registry.getParticipantByAddress(laconicAddress);
if (fetchedParticipant) {
setParticipant(fetchedParticipant);
} else {
@@ -69,7 +69,7 @@ const Validator = () => {
};
fetchParticipant();
- }, [cosmosAddress]);
+ }, [laconicAddress]);
const isMonikerValid = useMemo(() => moniker.trim().length > 0, [moniker]);
const isPubKeyValid = useMemo(() => pubKey.length === 44, [pubKey]);
@@ -96,15 +96,15 @@ const Validator = () => {
minSelfDelegation: "1",
delegatorAddress: "",
validatorAddress:
- cosmosAddress &&
- toBech32("laconicvaloper", fromBech32(cosmosAddress).data),
+ laconicAddress &&
+ toBech32("laconicvaloper", fromBech32(laconicAddress).data),
pubkey: encodedPubKey,
value: {
amount: process.env.REACT_APP_STAKING_AMOUNT!,
denom: process.env.REACT_APP_LACONICD_DENOM!,
},
};
- }, [cosmosAddress, pubKey, moniker]);
+ }, [laconicAddress, pubKey, moniker]);
const msgCreateValidatorEncodeObject: EncodeObject = {
typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator",
@@ -129,7 +129,7 @@ const Validator = () => {
try {
const params = {
transactionMessage: msgCreateValidatorEncodeObject,
- signer: cosmosAddress,
+ signer: laconicAddress,
};
const response = await signClient!.request<{ code: number }>({
topic: session!.topic,
@@ -167,9 +167,9 @@ const Validator = () => {
Select Laconic account:
- {Boolean(cosmosAddress) && (
+ {Boolean(laconicAddress) && (
<>
{participant ? (
Onboarded participant
@@ -189,7 +189,7 @@ const Validator = () => {
{participant && (
- Laconic Address: {participant.cosmosAddress}
+ Laconic Address: {participant.laconicAddress}
Nitro Address: {participant.nitroAddress}
Role: {participant.role}
KYC ID: {participant.kycId}
diff --git a/src/types.ts b/src/types.ts
index da7f296..7efa1cb 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,5 +1,5 @@
export interface Participant {
- cosmosAddress: string;
+ laconicAddress: string;
nitroAddress: string;
role: string;
kycId: string;