-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(base): add base chain support #5044
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
2f83f9f
feat: initial base chain support
alfetopito 1dafb32
feat: add COW token address on BASE
alfetopito a3da148
feat: update cow-sdk with base support
alfetopito ba69d1d
chore: bump permit-utils version to 0.5.0-RC.0
alfetopito 6207aab
feat: base for explorer
alfetopito 8d5d302
feat: fix widget configurator build, but var still required
alfetopito 51615f0
feat: add BASE stablecoins
alfetopito 924372d
feat: use uniswap's default list for chains where its supported
alfetopito 94ea6da
chore: use cbBTC instead of WBTC, which is way more liquid on Base
alfetopito 80d5c6e
fix: correct number of decimals for Base tokens
alfetopito dbfb2b6
feat: add base token list to explorer pre-loaded tokens
alfetopito 05bec85
feat: add isBaseEnabled feature flag
alfetopito 1014b2a
feat: add full coingecko list disabled to base
alfetopito 8714223
feat: add default fee recipient address for Base
alfetopito cad07f5
fix: add base to lp page links
alfetopito 08a75d4
feat: early exit on cowSwapFeeAtom if fee is not set for network
alfetopito 64a5151
refactor: single source of truth for stablecoins
alfetopito 9ac9d1f
chore: fix lint
alfetopito 43e11e4
fix: use correct basescan tld
alfetopito a2ad400
chore: remove unecessary conditional
alfetopito 163d954
feat: add base start date tooltip
alfetopito 0f04ef1
fix: use correct chain for twap small part warning
alfetopito a0979ae
chore: bump to latest cow-sdk
alfetopito c69e9ea
Merge branch 'develop' into feat/base
anxolin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions
4
apps/cowswap-frontend/src/common/pure/CurrencySelectButton/index.cosmos.tsx
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,18 @@ import { InfoCard } from './styled' | |
|
||
const DEFAULT_START_DATE = 'March 2023' | ||
const ARBITRUM_ONE_START_DATE = 'May 2024' | ||
const BASE_START_DATE = 'December 2024' | ||
|
||
|
||
|
||
const START_DATE: Record<SupportedChainId, string> = { | ||
[SupportedChainId.MAINNET]: DEFAULT_START_DATE, | ||
[SupportedChainId.GNOSIS_CHAIN]: DEFAULT_START_DATE, | ||
[SupportedChainId.ARBITRUM_ONE]: ARBITRUM_ONE_START_DATE, | ||
[SupportedChainId.BASE]: BASE_START_DATE, | ||
[SupportedChainId.SEPOLIA]: DEFAULT_START_DATE | ||
} | ||
|
||
|
||
export function SurplusCard() { | ||
const { surplusAmount, isLoading } = useTotalSurplus() | ||
|
@@ -29,7 +41,7 @@ export function SurplusCard() { | |
const surplusUsdAmount = useUsdAmount(showSurplusAmount ? surplusAmount : undefined).value | ||
const native = useNativeCurrency() | ||
const nativeSymbol = native.symbol || 'ETH' | ||
const isArbitrumOne = native.chainId === SupportedChainId.ARBITRUM_ONE | ||
const startDate = START_DATE[native.chainId as SupportedChainId] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now is cleaner :) |
||
|
||
const Wrapper = styled.div` | ||
margin: 12px auto 24px; | ||
|
@@ -158,9 +170,7 @@ export function SurplusCard() { | |
<i> | ||
Your total surplus{' '} | ||
<HelpTooltip | ||
text={`The total surplus CoW Swap has generated for you in ${nativeSymbol} across all your trades since ${ | ||
isArbitrumOne ? ARBITRUM_ONE_START_DATE : DEFAULT_START_DATE | ||
}`} | ||
text={`The total surplus CoW Swap has generated for you in ${nativeSymbol} across all your trades since ${startDate}`} | ||
/> | ||
</i> | ||
</span> | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add to github and vercel