diff --git a/CHANGELOG.md b/CHANGELOG.md index a091bbcf8..288dbc798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ changes. ### Fixed - Fix typescript bug leading to runtime error when entering Governance Action details page via direct link [Issue 1801](https://github.com/IntersectMBO/govtool/issues/1801) +- Fix accessing missing epochParams drep_deposit [Issue 1733](https://github.com/IntersectMBO/govtool/issues/1733) ### Changed diff --git a/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/RolesAndResponsibilities.tsx b/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/RolesAndResponsibilities.tsx index f1e322812..0cc27b7c2 100644 --- a/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/RolesAndResponsibilities.tsx +++ b/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/RolesAndResponsibilities.tsx @@ -20,7 +20,7 @@ export const RolesAndResponsibilities = ({ const { t } = useTranslation(); const { isMobile } = useScreenDimension(); - const deposit = getItemFromLocalStorage(PROTOCOL_PARAMS_KEY); + const epochParams = getItemFromLocalStorage(PROTOCOL_PARAMS_KEY); const onClickContinue = () => setStep(2); @@ -51,7 +51,7 @@ export const RolesAndResponsibilities = ({ />, ]} i18nKey="registration.rolesAndResponsibilitiesDescription" - values={{ deposit: correctAdaFormat(deposit.drep_deposit) }} + values={{ deposit: correctAdaFormat(epochParams?.drep_deposit) }} /> { // Create cert object using one Ada as the deposit dRepRegCert = DrepRegistration.new_with_anchor( dRepCred, - BigNum.from_str(`${epochParams.drep_deposit}`), + BigNum.from_str(`${epochParams?.drep_deposit}`), anchor, ); } else { console.error(t("errors.notUsingAnchor")); dRepRegCert = DrepRegistration.new( dRepCred, - BigNum.from_str(`${epochParams.drep_deposit}`), + BigNum.from_str(`${epochParams?.drep_deposit}`), ); } return Certificate.new_drep_registration(dRepRegCert); diff --git a/govtool/frontend/src/pages/RegisterAsDirectVoter.tsx b/govtool/frontend/src/pages/RegisterAsDirectVoter.tsx index 2d6128771..53e50233c 100644 --- a/govtool/frontend/src/pages/RegisterAsDirectVoter.tsx +++ b/govtool/frontend/src/pages/RegisterAsDirectVoter.tsx @@ -131,7 +131,7 @@ export const RegisterAsDirectVoter = () => { > openInNewTab("https://sancho.network/")}