Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/toolbox/components/ReverseProxySetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const generateHealthCheckCommand = (domain: string, chainId: string) => {
const processedDomain = nipify(domain);

return `curl -X POST --data '{
"jsonrpc":"2.0", "method":"eth_chainId", "params":[], "id":1
"jsonrpc":"2.0", "method":"eth_blockNumber", "params":[], "id":1
}' -H 'content-type:application/json;' \\
https://${processedDomain}/ext/bc/${chainId}/rpc`;
};
Expand Down
33 changes: 1 addition & 32 deletions components/toolbox/components/genesis/FeeConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function FeeConfigBase({
gasLimit,
setGasLimit,
targetBlockRate,
setTargetBlockRate,
feeConfig,
onFeeConfigChange,
validationMessages,
Expand All @@ -97,7 +96,6 @@ function FeeConfigBase({

// Local string state for smooth typing
const [gasLimitInput, setGasLimitInput] = useState(gasLimit.toString());
const [targetBlockRateInput, setTargetBlockRateInput] = useState(targetBlockRate.toString());
const [minBaseFeeInput, setMinBaseFeeInput] = useState((feeConfig.minBaseFee / 1000000000).toString());
const [baseFeeChangeDenominatorInput, setBaseFeeChangeDenominatorInput] = useState(feeConfig.baseFeeChangeDenominator.toString());
const [minBlockGasCostInput, setMinBlockGasCostInput] = useState(feeConfig.minBlockGasCost.toString());
Expand All @@ -109,9 +107,6 @@ function FeeConfigBase({
useEffect(() => {
if (focusedField !== 'gasLimit') setGasLimitInput(gasLimit.toString());
}, [gasLimit, focusedField]);
useEffect(() => {
if (focusedField !== 'targetBlockRate') setTargetBlockRateInput(targetBlockRate.toString());
}, [targetBlockRate, focusedField]);
useEffect(() => {
if (focusedField !== 'minBaseFee') setMinBaseFeeInput((feeConfig.minBaseFee / 1000000000).toString());
}, [feeConfig.minBaseFee, focusedField]);
Expand Down Expand Up @@ -140,14 +135,6 @@ function FeeConfigBase({
}
}, [setGasLimit]);

const handleTargetBlockRateChange = useCallback((value: string) => {
setTargetBlockRateInput(value);
const parsed = parseInt(value);
if (!isNaN(parsed)) {
setTargetBlockRate(parsed);
}
}, [setTargetBlockRate]);

const handleMinBaseFeeChange = useCallback((value: string) => {
setMinBaseFeeInput(value);
const parsed = parseFloat(value);
Expand Down Expand Up @@ -181,11 +168,6 @@ function FeeConfigBase({
if (gasLimitInput === '' || isNaN(parsed)) setGasLimitInput(gasLimit.toString());
break;
}
case 'targetBlockRate': {
const parsed = parseInt(targetBlockRateInput);
if (targetBlockRateInput === '' || isNaN(parsed)) setTargetBlockRateInput(targetBlockRate.toString());
break;
}
case 'minBaseFee': {
const parsed = parseFloat(minBaseFeeInput);
if (minBaseFeeInput === '' || isNaN(parsed)) setMinBaseFeeInput((feeConfig.minBaseFee / 1000000000).toString());
Expand Down Expand Up @@ -218,7 +200,7 @@ function FeeConfigBase({
}
}
setFocusedField(null);
}, [gasLimitInput, gasLimit, targetBlockRateInput, targetBlockRate, minBaseFeeInput, feeConfig, baseFeeChangeDenominatorInput, minBlockGasCostInput, maxBlockGasCostInput, blockGasCostStepInput, targetGasInput]);
}, [gasLimitInput, gasLimit, minBaseFeeInput, feeConfig, baseFeeChangeDenominatorInput, minBlockGasCostInput, maxBlockGasCostInput, blockGasCostStepInput, targetGasInput]);

return (
<div className="space-y-6">
Expand All @@ -239,19 +221,6 @@ function FeeConfigBase({
warning={validationMessages.warnings.gasLimit}
/>
</div>
<div key="targetBlockRate">
<Field
id="targetBlockRate"
label="Target Block Time (seconds)"
value={targetBlockRateInput}
onChange={handleTargetBlockRateChange}
onFocus={() => handleFocus('targetBlockRate')}
onBlur={() => normalizeOnBlur('targetBlockRate')}
placeholder="2"
error={validationMessages.errors.blockRate}
warning={validationMessages.warnings.blockRate}
/>
</div>
<div key="minBaseFee">
<Field
id="minBaseFee"
Expand Down
Loading