-
Notifications
You must be signed in to change notification settings - Fork 154
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 Flaky testschromium › e2e.spec.ts › Jumper full e2e flow › Should be able to navigate to the Jumper Learn 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 Failed testschromium › connectWallet.spec.ts › Connect Metamask with Jumper app and open /profile page › should connect wallet to Jumper 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:
|
src/app/ui/bridge/utils.tsx
Outdated
@@ -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 ?
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.
No, I removed the comment for now. But note: I double checked for multiple blockchain explorers on how the token-links work and removed and it turns out:
- all chains I have checked, the url for token infos is "token" as singular instead of "tokens"
- we also did have another issue as the blockExplorerUrls[0] already comes with a trailing-slash. Because we added another one, we ended up with "//" in the link
As a note: I did not check across all blockchains if the "/token" works as a general solution
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?
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.
If you mean the comment, it´s removed.
Generally on the JsonSchemaQA.tsx -> It´s meant to be a feature, not a bug.
There is a JSON schema for FAQs which is meant to improve search results. Our FAQ-component also makes use of the content and converts it into such a schema.
1.) As an example on our current FAQ on swap pages:
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Some Question here 1","acceptedAnswer":{"@type":"Answer","text":"Some Answer here 1"}},{"@type":"Question","name":"Some Question here 2","acceptedAnswer":{"@type":"Answer","text":"Some Answer here 2"}}]}
2.) You can paste it here to double test and validate the output:
https://developers.google.com/search/docs/appearance/structured-data/faqpage?hl=en
Todo:
|
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.
Few comments
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.
Just a comment
width={'100%'} | ||
height={'100%'} | ||
style={imageStyle} | ||
src={`${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}` : process.env.NEXT_PUBLIC_SITE_URL}/widget/widget-swap-amounts-${theme === 'dark' ? 'dark' : 'light'}.png`} //${theme === 'dark' ? 'dark' : 'light'} |
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.
Would be good to use getSiteUrl() instead
@@ -85,7 +85,7 @@ export async function GET(request: Request) { | |||
width={'100%'} | |||
height={'100%'} | |||
style={imageStyle} | |||
src={`${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}` : process.env.NEXT_PUBLIC_SITE_URL}/widget/widget-quotes-${theme === 'dark' ? 'dark' : 'light'}.png`} | |||
src={`${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}` : process.env.NEXT_PUBLIC_SITE_URL}/widget/widget${isSwap ? '-swap' : ''}-quotes-${theme === 'dark' ? 'dark' : 'light'}.png`} |
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.
Would be good to use getSiteUrl() instead
Ticket: https://lifi.atlassian.net/browse/LF-11128