diff --git a/packages/admin-ui/src/pages/stakers/components/StakerNetwork.tsx b/packages/admin-ui/src/pages/stakers/components/StakerNetwork.tsx index 09363baa0..d5eea417d 100644 --- a/packages/admin-ui/src/pages/stakers/components/StakerNetwork.tsx +++ b/packages/admin-ui/src/pages/stakers/components/StakerNetwork.tsx @@ -24,6 +24,7 @@ import { FaEthereum } from "react-icons/fa"; import Input from "components/Input"; import { Network } from "@dappnode/types"; import { useStakerConfig } from "./useStakerConfig"; +import { AlertDismissible } from "components/AlertDismissible"; export default function StakerNetwork({ network, @@ -145,169 +146,182 @@ export default function StakerNetwork({ } return ( -
- {currentStakerConfigReq.data ? ( - + <> + {network === "prater" && ( +

- Set up your Proof-of-Stake validator configuration for Ethereum and - Ethereum-based chains. You will need to:
- (1) Choose an Execution Layer client
- (2) Choose a Consensus Layer client (+ validator)
- (3) Install the web3signer, which will hold the validator keys and - sign
- {network !== "gnosis" && network !== "lukso" && ( - <> - (4) Optional; delegate block-building capacities through the MEV - Boost network and potentially profit from MEV - - )} + The prater network is about to be deprecated, please migrate to{" "} + Holesky.

-
+
+ )} -

{description}

+
+ {currentStakerConfigReq.data ? ( + +

+ Set up your Proof-of-Stake validator configuration for Ethereum + and Ethereum-based chains. You will need to:
+ (1) Choose an Execution Layer client
+ (2) Choose a Consensus Layer client (+ validator)
+ (3) Install the web3signer, which will hold the validator keys and + sign
+ {network !== "gnosis" && network !== "lukso" && ( + <> + (4) Optional; delegate block-building capacities through the + MEV Boost network and potentially profit from MEV + + )} +

+
- <> - - {newFeeRecipient && feeRecipientError && ( - - {feeRecipientError} - - )} - +

{description}

- - - Execution Clients - {currentStakerConfigReq.data.executionClients.map( - (executionClient, i) => ( - - key={i} - executionClient={executionClient} - setNewExecClient={setNewExecClient} - isSelected={ - executionClient.dnpName === newExecClient?.dnpName - } - /> - ) + <> + + {newFeeRecipient && feeRecipientError && ( + + {feeRecipientError} + )} - + - - Consensus Clients - {currentStakerConfigReq.data.consensusClients.map( - (consensusClient, i) => ( - - key={i} - consensusClient={{ - ...consensusClient, - useCheckpointSync: true - }} - setNewConsClient={setNewConsClient} - isSelected={ - consensusClient.dnpName === newConsClient?.dnpName - } - /> - ) - )} - + + + Execution Clients + {currentStakerConfigReq.data.executionClients.map( + (executionClient, i) => ( + + key={i} + executionClient={executionClient} + setNewExecClient={setNewExecClient} + isSelected={ + executionClient.dnpName === newExecClient?.dnpName + } + /> + ) + )} + - - Remote signer - - - {(network === "prater" || network === "mainnet") && ( - Mev Boost - Consensus Clients + {currentStakerConfigReq.data.consensusClients.map( + (consensusClient, i) => ( + + key={i} + consensusClient={{ + ...consensusClient, + useCheckpointSync: true + }} + setNewConsClient={setNewConsClient} + isSelected={ + consensusClient.dnpName === newConsClient?.dnpName + } + /> + ) + )} + + + + Remote signer + - )} - + {(network === "prater" || network === "mainnet") && ( + + Mev Boost + + + )} + -
+
-
-
- - {(network === "prater" || network === "holesky") && ( +
+
+ {(network === "prater" || network === "holesky") && ( + + )} +
+ + {!changes.isAllowed && changes.reason && ( + <> +
+
+ + Cannot apply changes: {changes.reason} + + )} -
- {!changes.isAllowed && changes.reason && ( - <> -
-
- - Cannot apply changes: {changes.reason} - - - )} + {reqStatus.error && ( + + )} +
- {reqStatus.error && ( - + {showLaunchpadValidators && allStakerItemsOk && ( + + } + setNewConfig={setNewConfig} + setShowLaunchpadValidators={setShowLaunchpadValidators} + setNewFeeRecipient={setNewFeeRecipient} + newFeeRecipient={newFeeRecipient} + setNewExecClient={setNewExecClient} + setNewConsClient={setNewConsClient} + setNewMevBoost={setNewMevBoost} + newExecClient={newExecClient} + newConsClient={newConsClient} + newMevBoost={newMevBoost} + feeRecipientError={feeRecipientError} + /> )} -
- - {showLaunchpadValidators && allStakerItemsOk && ( - - } - setNewConfig={setNewConfig} - setShowLaunchpadValidators={setShowLaunchpadValidators} - setNewFeeRecipient={setNewFeeRecipient} - newFeeRecipient={newFeeRecipient} - setNewExecClient={setNewExecClient} - setNewConsClient={setNewConsClient} - setNewMevBoost={setNewMevBoost} - newExecClient={newExecClient} - newConsClient={newConsClient} - newMevBoost={newMevBoost} - feeRecipientError={feeRecipientError} - /> - )} -
- ) : currentStakerConfigReq.error ? ( - - ) : currentStakerConfigReq.isValidating ? ( - - ) : ( - - )} -
+
+ ) : currentStakerConfigReq.error ? ( + + ) : currentStakerConfigReq.isValidating ? ( + + ) : ( + + )} +
+ ); }