-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR adds support for the Eigenpie IFO on Arbitrum, updates IFO constants, and refactors hooks and components related to VeCake and IFOs. ### Detailed summary - Added Eigenpie IFO on Arbitrum - Updated IFO constants and ChainNameMap - Refactored VeCake and IFO-related hooks and components > The following files were skipped due to too many changes: `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/ClaimButton.tsx`, `apps/web/src/views/Ifos/hooks/useIfoCredit.ts`, `packages/ifos/src/queries/fetchUserIfo.ts`, `apps/web/src/views/Ifos/CurrentIfo.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/index.tsx`, `apps/web/src/views/Home/components/Banners/hooks/useMultipleBannerConfig.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/IfoCardTokens.tsx`, `apps/web/src/views/Ifos/components/IfoPoolVaultCard.tsx`, `packages/widgets-internal/ifo/NoVeCakeCard.tsx`, `packages/uikit/src/components/Svg/Icons/LinkIcon.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/CrossChainVeCakeTips.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/IfoCardActions.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/StakeVaultButton.tsx`, `apps/web/src/utils/customGTMEventTracking.ts`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/ActivateProfileButton.tsx`, `packages/uikit/src/components/Svg/index.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/StakeButton.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/SyncVeCakeButton.tsx`, `apps/web/src/views/Ifos/hooks/v8/useGetWalletIfoData.ts`, `apps/web/src/components/CrossChainVeCakeModal/hooks/useProfileProxyWellSynced.ts`, `packages/widgets-internal/ifo/CrossChainLockInfoCard.tsx`, `packages/widgets-internal/ifo/CrossChainMyVeCake.tsx`, `packages/uikit/src/components/Svg/Icons/LinkSlashedIcon.tsx`, `packages/uikit/src/components/Svg/Icons/LinkPlusIcon.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/Achievement.tsx`, `apps/web/src/components/CrossChainVeCakeModal/hooks/useMultichainVeCakeWellSynced.ts`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/ContributeButton.tsx`, `apps/web/src/views/Ifos/components/IfoFoldableCard/IfoPoolCard/ContributeModal.tsx`, `apps/web/src/views/Home/components/Banners/EigenpieIFOBanner.tsx`, `apps/web/src/views/Ifos/components/IfoSteps.tsx`, `packages/localization/src/config/translations.json`, `packages/widgets-internal/ifo/ChainLogo.tsx`, `apps/web/src/views/Ifos/components/CrossChainVeCakeCard.tsx`, `apps/web/src/components/CrossChainVeCakeModal/index.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
1 parent
2d352bf
commit dbfa841
Showing
50 changed files
with
1,727 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
apps/web/src/components/CrossChainVeCakeModal/hooks/useTxnByChain.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ChainId } from '@pancakeswap/chains' | ||
import { IfoChainId } from '@pancakeswap/widgets-internal/ifo/constants' | ||
import { atom, useAtom } from 'jotai' | ||
|
||
const txnByChainAtom = atom<Record<Exclude<IfoChainId, ChainId.BSC>, string>>({ | ||
[ChainId.ARBITRUM_ONE]: '', | ||
[ChainId.ETHEREUM]: '', | ||
[ChainId.ZKSYNC]: '', | ||
}) | ||
|
||
export const useTxnByChain = () => { | ||
return useAtom(txnByChainAtom) | ||
} |
28 changes: 28 additions & 0 deletions
28
apps/web/src/components/CrossChainVeCakeModal/hooks/useUserVeCakeStatus.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ChainId } from '@pancakeswap/chains' | ||
import { useMultichainVeCakeWellSynced } from 'components/CrossChainVeCakeModal/hooks/useMultichainVeCakeWellSynced' | ||
import { useMemo } from 'react' | ||
import { useProfileProxyWellSynced } from './useProfileProxyWellSynced' | ||
|
||
export const useUserVeCakeStatus = (targetChainId?: ChainId, targetTime?: number) => { | ||
const { | ||
isVeCakeWillSync: isVeCakeSynced, | ||
bscBalance, | ||
bscProxyBalance, | ||
targetChainBalance, | ||
targetChainProxyBalance, | ||
} = useMultichainVeCakeWellSynced(targetChainId, targetTime) | ||
|
||
const { isSynced: isProfileSynced } = useProfileProxyWellSynced(targetChainId) | ||
|
||
const isSynced = useMemo(() => Boolean(isVeCakeSynced && isProfileSynced), [isVeCakeSynced, isProfileSynced]) | ||
|
||
return { | ||
isSynced, | ||
isVeCakeSynced: Boolean(isVeCakeSynced), | ||
isProfileSynced: Boolean(isProfileSynced), | ||
bscBalance, | ||
bscProxyBalance, | ||
targetChainBalance, | ||
targetChainProxyBalance, | ||
} | ||
} |
Oops, something went wrong.