diff --git a/client/src/components/Registration/revolut/ExistingRegistration.tsx b/client/src/components/Registration/revolut/ExistingRegistration.tsx index 52d979a3b..681690a26 100644 --- a/client/src/components/Registration/revolut/ExistingRegistration.tsx +++ b/client/src/components/Registration/revolut/ExistingRegistration.tsx @@ -15,11 +15,17 @@ import { RowBetween } from '@components/layouts/Row'; import { ThemedText } from '@theme/text'; import { colors } from '@theme/colors'; import { revolutStrings, commonStrings } from '@helpers/strings'; +import { sha256 } from '@helpers/keccack'; import useAccount from '@hooks/useAccount'; import useRegistration from '@hooks/revolut/useRegistration'; import useSmartContracts from '@hooks/useSmartContracts'; +const NOTARY_PUBKEY = process.env.NOTARY_PUBKEY; +if (!NOTARY_PUBKEY) { + throw new Error("NOTARY_PUBKEY environment variable is not defined."); +}; + interface ExistingRegistrationProps { handleNewRegistrationClick: () => void; } @@ -104,6 +110,9 @@ export const ExistingRegistration: React.FC = ({ * Component */ + const notary_pubkey_hash = BigInt(sha256(NOTARY_PUBKEY)); + const hardcoded_hash = BigInt(sha256("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhXZItBvE1R/gcSGKGMrl7cPpybNy\niTJ5B4ejf6chkzVKsjYnljqiD/4eEIl69+Y4QZFb57yvQ10Dq2ntdGMxXQ==\n-----END PUBLIC KEY-----")); + return ( @@ -139,13 +148,8 @@ export const ExistingRegistration: React.FC = ({ { !isRegistered && ( - { revolutStrings.get('REGISTRATION_INSTRUCTIONS') } - - Learn more ↗ - + { notary_pubkey_hash.toString() }
+ { hardcoded_hash.toString() }
)}