Skip to content

Commit

Permalink
refactor: rename StakingContractInfoProvider to StakingContractDetail…
Browse files Browse the repository at this point in the history
…sProvider for clarity
  • Loading branch information
mohandast52 committed Nov 15, 2024
1 parent 320ec4d commit 6599c2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const StakingContractInfoContext =
setIsPaused: () => {},
});

export const StakingContractInfoProvider = ({
export const StakingContractDetailsProvider = ({
children,
}: PropsWithChildren) => {
const { services } = useContext(ServicesContext);
Expand All @@ -71,7 +71,8 @@ export const StakingContractInfoProvider = ({

const serviceId = useMemo(
() =>
services?.[0]?.chain_configs[CHAIN_CONFIG.OPTIMISM.chainId].chain_data?.token,
services?.[0]?.chain_configs[CHAIN_CONFIG.OPTIMISM.chainId].chain_data
?.token,
[services],
);

Expand Down
2 changes: 1 addition & 1 deletion frontend/hooks/useStakingContractInfo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isNil } from 'lodash';
import { useContext } from 'react';

import { StakingContractInfoContext } from '@/context/StakingContractInfoProvider';
import { StakingContractInfoContext } from '@/context/StakingContractDetailsProvider';
import { StakingProgramId } from '@/enums/StakingProgram';

export const useStakingContractContext = () => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RewardProvider } from '@/context/RewardProvider';
import { ServicesProvider } from '@/context/ServicesProvider';
import { SettingsProvider } from '@/context/SettingsProvider';
import { SetupProvider } from '@/context/SetupProvider';
import { StakingContractInfoProvider } from '@/context/StakingContractInfoProvider';
import { StakingContractDetailsProvider } from '@/context/StakingContractDetailsProvider';
import { StakingProgramProvider } from '@/context/StakingProgramProvider';
import { StoreProvider } from '@/context/StoreProvider';
import { SystemNotificationTriggers } from '@/context/SystemNotificationTriggers';
Expand Down Expand Up @@ -44,7 +44,7 @@ export default function App({ Component, pageProps }: AppProps) {
<WalletProvider>
<MasterSafeProvider>
<StakingProgramProvider>
<StakingContractInfoProvider>
<StakingContractDetailsProvider>
<RewardProvider>
<BalanceProvider>
<SetupProvider>
Expand All @@ -66,7 +66,7 @@ export default function App({ Component, pageProps }: AppProps) {
</SetupProvider>
</BalanceProvider>
</RewardProvider>
</StakingContractInfoProvider>
</StakingContractDetailsProvider>
</StakingProgramProvider>
</MasterSafeProvider>
</WalletProvider>
Expand Down

0 comments on commit 6599c2f

Please sign in to comment.