Add Rango Exchange plugin (take 2)#330
Merged
paullinator merged 3 commits intomasterfrom Jun 24, 2024
Merged
Conversation
08408c4 to
601e5df
Compare
Member
Author
|
My new commits address comments from original PR #322 |
601e5df to
f5a7988
Compare
6 tasks
peachbits
requested changes
Jun 24, 2024
src/swap/defi/rango.ts
Outdated
|
|
||
| metaRequest | ||
| .then(metaResponse => { | ||
| metaRequestPromise = metaRequest |
Contributor
There was a problem hiding this comment.
This should be broken out as a function and calling it should be governed by a global boolean instead of the promise. Otherwise, a rejected means the user will never use this plugin for the rest of their session.
src/swap/defi/rango.ts
Outdated
| return metaResponse.json() | ||
| return await metaResponse.json() | ||
| } else { | ||
| return await metaResponse.text() |
Contributor
There was a problem hiding this comment.
Throw the return from .text() so the log is more useful than a cleaner error
src/swap/defi/rango.ts
Outdated
| disableEstimate: true, | ||
| slippage: DEFAULT_SLIPPAGE, | ||
| ...(referrerAddress !== undefined && | ||
| ...(referrerAddress != null && |
Contributor
There was a problem hiding this comment.
Optional: Can we just enforce that these exist where they're declared and get rid of this spread/boolchain nonsense?
Member
Author
There was a problem hiding this comment.
No we shouldn't enforce they exist as the plugin should be usable without referral fees.
f5a7988 to
04a4302
Compare
peachbits
approved these changes
Jun 24, 2024
Some chains are disabled until we write code to support them but add them commented out anyway so we know their codes
04a4302 to
6f7be5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
New branch to address comments from #322