feat: render validator requests by validator count

This commit is contained in:
RadoslavDimchev 2023-09-26 23:03:21 +03:00
parent 9c7e65a210
commit 314c4238ab
1 changed files with 2 additions and 7 deletions

View File

@ -16,11 +16,6 @@ const Deposit = () => {
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
const [validatorCount, setValidatorCount] = useState(0)
const { isWalletConnected } = useSelector((state: RootState) => state.deposit)
const validatorRequests = [
{ name: '1', address: 'zQ3asdf9d4Gs0' },
{ name: '2', address: 'zQ3asdf9d4Gs0' },
]
const isTransactionConfirmation = false
const addValidatorHandler = () => {
@ -54,8 +49,8 @@ const Deposit = () => {
/>
)}
<DividerLine />
{validatorRequests.map((validator, index) => (
<ValidatorRequest validator={validator} key={index} />
{Array.from({ length: validatorCount }).map((_, index) => (
<ValidatorRequest key={index} number={index + 1} />
))}
{isInfoBoxVisible && (
<InformationBox