-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify SwapInputController animated reaction logic for responding t…
…o input value changes (#5923) * Remove redundant sliderXPosition update in debounced onTypedNumber * Remove redundant preservedAmount argument in onTypedNumber as the default is true * Pull out resetToZero as its own worklet to reduce redundant code * Remove unnecessary check for amount > 0 now that onTypedNumber is only used for when the amount is > 0 * Replace onTypedNumber with debouncedFetchQuote function * Pull out variables for prev input / output native values for code readability * Calculate native value based on the new amounts and native prices to be more accurate * Simplify resetToZeroValues logic
- Loading branch information
Showing
1 changed file
with
45 additions
and
120 deletions.
There are no files selected for viewing
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