diff --git a/src/app/components/Delegations/Delegation.tsx b/src/app/components/Delegations/Delegation.tsx index 67ae0d9b..cb79996d 100644 --- a/src/app/components/Delegations/Delegation.tsx +++ b/src/app/components/Delegations/Delegation.tsx @@ -7,7 +7,6 @@ import { RegistrationStartModal } from "@/app/components/Modals/RegistrationModa import { SignModal } from "@/app/components/Modals/SignModal/SignModal"; import { ONE_MINUTE } from "@/app/constants"; import { useRegistrationService } from "@/app/hooks/services/useRegistrationService"; -import { useHealthCheck } from "@/app/hooks/useHealthCheck"; import { useDelegationState } from "@/app/state/DelegationState"; import { useFinalityProviderState } from "@/app/state/FinalityProviderState"; import { @@ -68,7 +67,6 @@ export const Delegation: React.FC = ({ const { startTimestamp } = stakingTx; const [currentTime, setCurrentTime] = useState(Date.now()); - const { isApiNormal, isGeoBlocked } = useHealthCheck(); const { processing, registrationStep: step, diff --git a/src/app/hooks/services/useRegistrationService.ts b/src/app/hooks/services/useRegistrationService.ts index 6496bf64..cebf87ed 100644 --- a/src/app/hooks/services/useRegistrationService.ts +++ b/src/app/hooks/services/useRegistrationService.ts @@ -9,6 +9,8 @@ import { DelegationV2StakingState as DelegationState } from "@/app/types/delegat import { ErrorState } from "@/app/types/errors"; import { retry } from "@/utils"; +import { useDelegations } from "../client/api/useDelegations"; + import { SigningStep, useTransactionService } from "./useTransactionService"; interface RegistrationData { @@ -28,6 +30,7 @@ export function useRegistrationService() { selectedDelegation, resetRegistration: reset, } = useDelegationState(); + const { refetch: refetchV1Delegations } = useDelegations(); const { transitionPhase1Delegation } = useTransactionService(); const { addDelegation } = useDelegationV2State(); const { showError } = useError(); @@ -85,6 +88,7 @@ export function useRegistrationService() { ); if (delegation) { setStep("registration-verified"); + refetchV1Delegations(); } setProcessing(false); } catch (error: any) { @@ -104,6 +108,7 @@ export function useRegistrationService() { showError, selectedDelegation, addDelegation, + refetchV1Delegations, ]); return { registerPhase1Delegation };