-
Notifications
You must be signed in to change notification settings - Fork 152
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: add dynamic swap page #1575
base: develop
Are you sure you want to change the base?
feat: add dynamic swap page #1575
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Test results (3/4)Details 5 tests across 2 suites |
Test results (4/4)Details 5 tests across 2 suites |
Test results (2/4)Details 5 tests across 1 suite Skipped testschromium › e2e.spec.ts › Jumper full e2e flow › Should be able to open quests mission page and switch background color |
Test results (1/4)Details 6 tests across 2 suites Skipped testschromium › e2e.spec.ts › Jumper full e2e flow › Should be able to navigate to profile and open first Mission |
@tcheee
--> ToToken: We could potentially filter for a specific token name and only return USDT/USDC or somewhat. What do you prefer? |
Todos:
|
|
||
const openGraph: Metadata['openGraph'] = { | ||
title: title, | ||
description: `Jumper offers the best way to swap tokenA to tokenB on ${sourceChain?.name} with the fastest speeds, lowest costs, and most secure swap providers available.`, |
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.
should be "to swap tokens on"
import { getSiteUrl } from '@/const/urls'; | ||
|
||
//Optimized function to generate ordered bridge pairs (tokens from different chains) | ||
const generateBridgeOrderedPairs = (tokens: Token[]) => { |
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.
why do we keep this ?
coins.filter((c) => availableChainsId.includes(c.chainId)) as Token[], | ||
); | ||
|
||
// Split the ordered array into chunks of 50,000 |
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.
why do we need this?
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.
we should have only 32 (or something like this) page now?
const orderedChunks = ordered.slice(start, end); | ||
|
||
const routes = orderedChunks.map(([a, b]) => ({ | ||
url: `${getSiteUrl()}/bridge/${`${getChainById(chains, a.chainId)?.name}-${a.symbol}-to-${getChainById(chains, b.chainId)?.name}-${b.symbol}`.toLowerCase()}`, |
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.
not good, seems to have bee copied without adaptation from the bridge
|
||
const BridgeExplanationSection = () => { | ||
return ( | ||
<BridgePageContainer> | ||
<SeoPageContainer> |
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.
pls don't call it SEO
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.
call is TokenSwap or something like this
@@ -17,7 +17,13 @@ export function buildExplorerLink( | |||
color="text.primary" | |||
component={Link} | |||
target="_blank" | |||
href={`${blockExplorerUrls[0]}/tokens/${address}`} | |||
href={`${blockExplorerUrls[0]}tokens/${address}`} // todo: on OP it needs to be "token/..." |
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.
do we need the ocmment ?
destinationToken?: Token; | ||
} | ||
|
||
const BridgePage = ({ |
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.
pls rename it
); | ||
} | ||
|
||
export function getChainInfoData(chainInfo: ExtendedChain) { |
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.
can't we reuse the function from the "/bridge" page ?
el.attributes.Answer as unknown as BlocksProps[], | ||
); | ||
const text = el.Answer; | ||
// used for data from strapi --> |
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.
do we nee to keep it?
import type { BoxProps } from '@mui/system'; | ||
import { Box, styled } from '@mui/system'; | ||
|
||
export const SeoPageContainer = styled(Box)<BoxProps>(({ theme }) => ({ |
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.
to rename to "SwapPageContainer"
Ticket: https://lifi.atlassian.net/browse/LF-11128