-
Notifications
You must be signed in to change notification settings - Fork 96
Near intents integration #378
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
base: master
Are you sure you want to change the base?
Near intents integration #378
Conversation
7f3a37d to
8478ac0
Compare
| } | ||
|
|
||
| const userAddr = extra.userAddress?.toLowerCase() ?? zeroAddress; | ||
| const isDryRun = !extra.userAddress || extra.userAddress === zeroAddress; |
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 fetch dry quotes only during discovery/price comparison and defer real quotes until the user actually initiates a swap (the quote is cached so when we get the real one it will be the same afaik)
silent-shipper
left a comment
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.
Code looks good
| function isNativeToken(address: string): boolean { | ||
| return address === zeroAddress || address.toLowerCase() === nativeToken.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.
I think we can identify all native tokens by checking if they don't have contractAddress on the token list
Adds NEAR Intents (1Click API) as a new swap aggregator.
Changes
src/components/Aggregator/adapters/nearintents/list.tsFeatures
API Docs
https://docs.near-intents.org/near-intents/integration/distribution-channels/1click-api