From 1a5ed0b07f197835c4a106319508bf1647f394de Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Thu, 18 Jan 2024 21:56:29 +0200 Subject: [PATCH] move constants in place --- src/constants.ts | 36 +++++++++++++++++++ .../Advisories/Advisories.tsx | 36 +------------------ 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 1c6a6033..0e110eeb 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,6 @@ +type AdvisoryTopicsType = { + [key: string]: string[] +} // App export const apiKey = '1730eff0-9d50-4382-a3fe-89f0d34a2070' const INFURA_KEY = 'f25e905e25a545dcaad2c939530b91db' @@ -122,3 +125,36 @@ export const VALIDATORS_DATA = [ status: 'Active', }, ] +//Validator onboarding -> advisories -> text +export const advisoryTopics: AdvisoryTopicsType = { + 'Proof of Stake': [ + 'Proof of Stake systems require validators to hold and lock up a certain amount of cryptocurrency to participate.', + 'In Proof of Stake, the chances of creating a block is proportional to the amount of cryptocurrency held.', + 'Unlike Proof of Work, Proof of Stake aims to achieve consensus without intensive computational work.', + ], + Deposit: [ + 'Deposits are often irreversible, so ensure to double-check transaction details before confirming.', + 'Delay in deposit acknowledgment might be due to network congestion or node synchronization.', + 'Always keep transaction IDs or hashes for records and future references in case of disputes.', + ], + 'Key Management': [ + 'Storing your private keys on a device connected to the internet is susceptible to hacks and malware.', + 'Hardware wallets provide an added layer of security by keeping private keys isolated from online systems.', + 'Regularly back up and encrypt your key management solutions to prevent potential losses.', + ], + 'Bad Behaviour': [ + 'If you try to cheat the system, or act contrary to the specification, you will be liable to incur a penalty known as slashing.', + 'Running your validator keys simultaneously on two or more machines will result in slashing.*', + 'Simply being offline with an otherwise healthy network does not result in slashing, but will result in small inactivity penalties.', + ], + Requirements: [ + 'Ensure your system meets the minimum software and hardware requirements before initiating any operations.', + 'Staying updated with the latest versions is vital to maintain system integrity and performance.', + 'Failure to meet requirements might result in operational inefficiencies or security vulnerabilities.', + ], + Risks: [ + 'Cryptocurrency investments are subject to high volatility and can result in both significant gains and losses.', + 'Always do thorough research before making investment decisions or engaging in transactions.', + 'Be wary of phishing scams, malicious software, and too-good-to-be-true offers.', + ], +} diff --git a/src/pages/ValidatorOnboarding/Advisories/Advisories.tsx b/src/pages/ValidatorOnboarding/Advisories/Advisories.tsx index a9e0a90a..c6a31329 100644 --- a/src/pages/ValidatorOnboarding/Advisories/Advisories.tsx +++ b/src/pages/ValidatorOnboarding/Advisories/Advisories.tsx @@ -7,9 +7,7 @@ import { useDispatch, useSelector } from 'react-redux' import { RootState } from '../../../redux/store' import { setSubStepAdvisories } from '../../../redux/ValidatorOnboarding/Advisories/slice' import './advisoriesLayout.css' -type AdvisoryTopicsType = { - [key: string]: string[] -} + const Advisories = () => { const dispatch = useDispatch() const { subStepAdvisories } = useSelector((state: RootState) => state.advisories) @@ -76,35 +74,3 @@ const Advisories = () => { export default Advisories -export const advisoryTopics: AdvisoryTopicsType = { - 'Proof of Stake': [ - 'Proof of Stake systems require validators to hold and lock up a certain amount of cryptocurrency to participate.', - 'In Proof of Stake, the chances of creating a block is proportional to the amount of cryptocurrency held.', - 'Unlike Proof of Work, Proof of Stake aims to achieve consensus without intensive computational work.', - ], - Deposit: [ - 'Deposits are often irreversible, so ensure to double-check transaction details before confirming.', - 'Delay in deposit acknowledgment might be due to network congestion or node synchronization.', - 'Always keep transaction IDs or hashes for records and future references in case of disputes.', - ], - 'Key Management': [ - 'Storing your private keys on a device connected to the internet is susceptible to hacks and malware.', - 'Hardware wallets provide an added layer of security by keeping private keys isolated from online systems.', - 'Regularly back up and encrypt your key management solutions to prevent potential losses.', - ], - 'Bad Behaviour': [ - 'If you try to cheat the system, or act contrary to the specification, you will be liable to incur a penalty known as slashing.', - 'Running your validator keys simultaneously on two or more machines will result in slashing.*', - 'Simply being offline with an otherwise healthy network does not result in slashing, but will result in small inactivity penalties.', - ], - Requirements: [ - 'Ensure your system meets the minimum software and hardware requirements before initiating any operations.', - 'Staying updated with the latest versions is vital to maintain system integrity and performance.', - 'Failure to meet requirements might result in operational inefficiencies or security vulnerabilities.', - ], - Risks: [ - 'Cryptocurrency investments are subject to high volatility and can result in both significant gains and losses.', - 'Always do thorough research before making investment decisions or engaging in transactions.', - 'Be wary of phishing scams, malicious software, and too-good-to-be-true offers.', - ], -}