pancake-frontend icon indicating copy to clipboard operation
pancake-frontend copied to clipboard

TWAP by Orbs

Open denis-orbs opened this issue 11 months ago • 11 comments

Integrate dTWAP by Orbs into PancakeSwap.

TWAP repo TWAP UI repo

Screenshot 2024-03-04 at 15 33 32 Screenshot 2024-03-04 at 15 33 43

PR-Codex overview

This PR focuses on adding TWAP functionality and improving swap selection in the Swap feature.

Detailed summary

  • Added TWAP functionality with TwapAndLimitSwap and Twap pages
  • Updated SwapSelection component for better swap type selection
  • Introduced SwapType enum for different swap types

The following files were skipped due to too many changes: apps/web/src/views/Swap/Twap/Twap.tsx, pnpm-lock.yaml

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

denis-orbs avatar Mar 04 '24 13:03 denis-orbs

⚠️ No Changeset found

Latest commit: 284719e16dd33160a5f044140d9f1a0aa8e6d300

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Mar 04 '24 13:03 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aptos-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:00am
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:00am
bridge ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:00am
games ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:00am
uikit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:00am
web ✅ Ready (Inspect) Visit Preview 💬 1 unresolved Apr 11, 2024 7:00am

vercel[bot] avatar Mar 04 '24 13:03 vercel[bot]

@denis-orbs is attempting to deploy a commit to the PancakeSwap Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 04 '24 13:03 vercel[bot]

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@defi.org/[email protected], npm/@emotion/[email protected], npm/@emotion/[email protected], npm/@emotion/[email protected], npm/@emotion/[email protected], npm/@nomicfoundation/[email protected], npm/@nomicfoundation/[email protected], npm/@nomiclabs/[email protected], npm/@sentry/[email protected], npm/@typechain/[email protected], npm/@typechain/[email protected], npm/@typechain/[email protected], npm/@types/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

socket-security[bot] avatar Mar 04 '24 13:03 socket-security[bot]

can we split those by page? You can use Component.Layout to preserve the layout

0xjojoex avatar Mar 06 '24 05:03 0xjojoex

The /swap page first load js diff from 1.35MB to 2MB

0xjojoex avatar Mar 06 '24 06:03 0xjojoex

can we split those by page? You can use Component.Layout to preserve the layout

you mean to do nested routing? twap page will be /swap/twap

so the modules will not load simultaneously?

denis-orbs avatar Mar 06 '24 09:03 denis-orbs

can we split those by page? You can use Component.Layout to preserve the layout

image Do you meant it to be like this (nested routes)?

or did you want each tab to be in its own separate page, with a link in the navigation bar? image

denis-orbs avatar Mar 07 '24 19:03 denis-orbs

can we split those by page? You can use Component.Layout to preserve the layout

image Do you meant it to be like this (nested routes)? or did you want each tab to be in its own separate page, with a link in the navigation bar? image

Yes, just we are just talking about having the url (page) for each tab. for the UI side, please follow @chef-bun comments

0xjojoex avatar Mar 08 '24 02:03 0xjojoex

Hi the build failed. Could you help check? Seems like the lock file is not up-to-date

chefjackson avatar Mar 13 '24 05:03 chefjackson

@SocketSecurity ignore npm/@sentry/[email protected] @SocketSecurity ignore npm/@emotion/[email protected] @SocketSecurity ignore npm/@types/[email protected] @SocketSecurity ignore npm/@emotion/[email protected] @SocketSecurity ignore npm/@nomicfoundation/[email protected] @SocketSecurity ignore npm/@typechain/[email protected] @SocketSecurity ignore npm/@typechain/[email protected] @SocketSecurity ignore npm/@typechain/[email protected] @SocketSecurity ignore npm/@nomiclabs/[email protected] @SocketSecurity ignore npm/@emotion/[email protected] @SocketSecurity ignore npm/@emotion/[email protected] @SocketSecurity ignore npm/@defi.org/[email protected] @SocketSecurity ignore npm/@nomicfoundation/[email protected]

chefjackson avatar Mar 22 '24 06:03 chefjackson

@SocketSecurity ignore npm/@defi.org/[email protected] @SocketSecurity ignore npm/@nomicfoundation/[email protected] @SocketSecurity ignore npm/@emotion/[email protected] @SocketSecurity ignore npm/@emotion/[email protected]

chefjackson avatar Apr 09 '24 07:04 chefjackson

@SocketSecurity ignore npm/@orbs-network/[email protected]

chefjackson avatar Apr 09 '24 07:04 chefjackson