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

swap button states #5785

Merged
merged 38 commits into from
Jun 14, 2024
Merged

swap button states #5785

merged 38 commits into from
Jun 14, 2024

Conversation

greg-schrammel
Copy link
Contributor

@greg-schrammel greg-schrammel commented May 29, 2024

Fixes APP-1486

What changed (plus any additional context for devs)

Screen recordings / screenshots

Screen.Recording.2024-06-05.at.16.50.04.mov

What to test

brunobar79 and others added 5 commits May 29, 2024 17:20
* add more fns

* accept string or number

* update errors
* .

* oop

* oop

* okay ty ben

* change background opacity to 1

* .

* oop

* .
* perf

* ✨

* useWhyDidYouUpdate

* EstimatedSwapGasFee

* keepPreviousData

* AnimatedText

* isSameAddress
@jinchung jinchung self-requested a review June 5, 2024 15:05
Comment on lines +35 to +44
export const useSyncedSwapQuoteStore = create<InternalSyncedSwapState>(() => ({
assetToBuy: undefined,
assetToSell: undefined,
chainId: undefined,
quote: null,
}));
const setInternalSyncedSwapStore = debounce((state: InternalSyncedSwapState) => useSyncedSwapQuoteStore.setState(state), 100, {
leading: false,
trailing: true,
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

went with a external store to prevent unnecessary rerenders

src/languages/en_US.json Outdated Show resolved Hide resolved
@walmat walmat self-requested a review June 13, 2024 20:03
@jinchung
Copy link
Member

jinchung commented Jun 13, 2024

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-06-13.at.16.05.37.mp4

I'm seeing a consistent flashing when going back and forth between max and less than max for the network's native token:

  1. In the video, I move from default to max: see fetching -> flash of Review -> insufficient funds
  2. when I go back down from max: see fetching -> flash of Insufficient Funds -> Review

@greg-schrammel greg-schrammel merged commit fc0ff05 into develop Jun 14, 2024
6 checks passed
@greg-schrammel greg-schrammel deleted the review-button-states branch June 14, 2024 20:41
jinchung added a commit that referenced this pull request Jun 15, 2024
jinchung added a commit that referenced this pull request Jun 15, 2024
@walmat walmat restored the review-button-states branch June 17, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants