-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Swaps: Use contract balance when token is not added #2360
Merged
Merged
Conversation
This file contains 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
estebanmino
reviewed
Mar 9, 2021
app/components/UI/Swaps/index.js
Outdated
? controllerBalance | ||
: contractBalance; | ||
const balanceAsUnits = | ||
isSwapsETH(sourceToken) || (!isSwapsETH(sourceToken) && isTokenInBalances) |
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.
isn't the !isSwapsETH(sourceToken)
already truthy is the sentence goes to the second statement?
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.
also useMemo
?
estebanmino
reviewed
Mar 9, 2021
estebanmino
approved these changes
Mar 9, 2021
estebanmino
added a commit
that referenced
this pull request
Mar 10, 2021
* REVERT * Swaps: Add info modal when swaps is off (#2320) * Fix info modal when enabled * Swaps: Add clientId (#2324) * Add a longer list of tokens (#2331) * Swaps: Adjust Keypad size for medium and smaller devices (#2335) * swaps: anonymous tracking (#2325) * addtrack * booleam * fixanalytics * trackanon * devmoderevert * track anonymously * dont send data for non anonymized * Revert "devmoderevert" This reverts commit ff70e38. Co-authored-by: Ethan Wessel <ejwessel@gmail.com> * Swaps: Use decimal value for swaps tx (#2338) * swaps: custom gas price (#2337) * fix * comment * controller * 588 * Swaps: Fix disabled button opacity (#2339) * Swaps: Fix use max (#2361) * Swaps: Use contract balance when token is not added (#2360) * Swaps: use destination amount when no rate is available (#2362) * swaps: improve custom gas price and limit selection (#2358) * onHandleGasFeeSelection * minimumGasLimit * fixes * fixminimumlimit * 590 * Swaps: transactions general view filtering (#2364) * filtercorrectly * improvefilters * bumpir * filtercorrectly * filters * circle * ONLY_MAINNET * rmtestnet Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: Ethan Wessel <ejwessel@gmail.com>
rickycodes
pushed a commit
that referenced
this pull request
Jan 31, 2022
* REVERT * Swaps: Add info modal when swaps is off (#2320) * Fix info modal when enabled * Swaps: Add clientId (#2324) * Add a longer list of tokens (#2331) * Swaps: Adjust Keypad size for medium and smaller devices (#2335) * swaps: anonymous tracking (#2325) * addtrack * booleam * fixanalytics * trackanon * devmoderevert * track anonymously * dont send data for non anonymized * Revert "devmoderevert" This reverts commit ff70e38. Co-authored-by: Ethan Wessel <ejwessel@gmail.com> * Swaps: Use decimal value for swaps tx (#2338) * swaps: custom gas price (#2337) * fix * comment * controller * 588 * Swaps: Fix disabled button opacity (#2339) * Swaps: Fix use max (#2361) * Swaps: Use contract balance when token is not added (#2360) * Swaps: use destination amount when no rate is available (#2362) * swaps: improve custom gas price and limit selection (#2358) * onHandleGasFeeSelection * minimumGasLimit * fixes * fixminimumlimit * 590 * Swaps: transactions general view filtering (#2364) * filtercorrectly * improvefilters * bumpir * filtercorrectly * filters * circle * ONLY_MAINNET * rmtestnet Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: Ethan Wessel <ejwessel@gmail.com>
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.
Description
This PR adds the feature to use token contract balance when is not added to the token list
Checklist
Issue
Resolves #???