-
Notifications
You must be signed in to change notification settings - Fork 1.6k
dTWAP and dLIMIT integration by Orbs #1550
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
Conversation
|
@denis-orbs is attempting to deploy a commit to the Sushi Team on Vercel. A member of the Team first needs to authorize it. |
apps/web/src/ui/swap/twap.tsx
Outdated
import { SimpleSwapBridgeBanner } from "./simple/simple-swap-bridge-banner"; | ||
|
||
const LOGO = { | ||
[ChainId.BASE]: "ethereum.svg", |
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?
apps/web/src/ui/swap/twap.tsx
Outdated
return ( | ||
<Dialog open={open} onOpenChange={() => onClose()}> | ||
<DialogContent> | ||
{" "} |
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.
intentional?
apps/web/src/ui/swap/twap.tsx
Outdated
children, | ||
onSelect, | ||
}: { | ||
selected: any; |
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.
any (guessing Type
would work as in the onSelect type?)
apps/web/src/ui/swap/twap.tsx
Outdated
}; | ||
}; | ||
|
||
const usePriceUSD = (address?: string) => { |
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.
address
should have the Address
type from viem
apps/web/src/ui/swap/twap.tsx
Outdated
|
||
const useTokenList = () => { | ||
const { data: customTokenMap } = useCustomTokens(); | ||
const chainId = useDerivedStateSimpleSwap().state.chainId; |
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.
same as above with the pattern
apps/web/src/ui/swap/twap.tsx
Outdated
|
||
const { data: otherTokenMap } = useOtherTokenListsQuery({ | ||
chainId, | ||
query: "", |
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.
ideally query
should be optional on useOtherTokenListsQuery
, but it's not, think undefined
would make more sense than ""
apps/web/src/ui/swap/twap.tsx
Outdated
customTokenMap, | ||
tokenMap, | ||
chainId, | ||
balancesMap: {}, |
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.
balancesMap
can be removed
apps/web/src/ui/swap/twap.tsx
Outdated
}; | ||
|
||
export const useIsTwapSupported = () => { | ||
const { state } = useDerivedStateSimpleSwap(); |
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.
{ state }
-> { state: { chainId } }
@denis-orbs I've been looking around your packages and the amount of dependencies they use is honestly too excessive. Lodash is not necessary nowadays at all, and importing the whole thing (with I've spent the whole of June trying to reduce our bundle sizes and managed to get them down to ~800-900KB for |
@denis-orbs In an ideal world we'd prefer to have the business logic live inside our repo and make use of our UI component library. We have concerns with bundle sizes which as Lufy mentioned has been a key focus in the past couple of months, but also with uneccasary dependencies which themselves could have loose dependecies that could pose a secuirty issue down the line, generally we tend to own rather than clone in a lot of cases these days. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@types/[email protected], npm/[email protected] |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
recreated the PR here, to get all the checks + the deployment to run |
Added dTWAP and dLIMIT pages
demo link
images:



PR-Codex overview
The focus of this PR is to introduce support for a new feature called TWAP (Time-Weighted Average Price) in the SushiSwap UI.
Detailed summary
keyv
to the list of ignored plugins in Webpack configuration@orbs-network/twap-ui-sushiswap
and other packages