Skip to content
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 3 commits into from
Mar 9, 2021

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented Mar 9, 2021

Description

This PR adds the feature to use token contract balance when is not added to the token list

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

@wachunei wachunei requested a review from a team as a code owner March 9, 2021 12:52
? controllerBalance
: contractBalance;
const balanceAsUnits =
isSwapsETH(sourceToken) || (!isSwapsETH(sourceToken) && isTokenInBalances)
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also useMemo?

@wachunei wachunei merged commit c37ddf7 into swaps-v1 Mar 9, 2021
@wachunei wachunei deleted the feature/fallback-to-contract-balance branch March 9, 2021 15:08
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants