Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix token input for typing balance value manually (#862)
Resolves #764 ### What When user was typing the balance amount manually then input was not updating values correctly. We moved to `useCallback` instead of `useEffect` and fixed the condition for updating parent component with new values. The issue was caused mostly by incorrect condition but I wanted to get rid of `useEffect` as the dependencies array was intentionally incomplete and it seems like it wasn't the most correct hook anyway. ### Testing General regression testing is needed here (@michalinacienciala). Let's not merge unless it will be tested for regressions. - [x] make sure scenarios written in the task above are working correctly now - [x] test staking and unstaking both full and partial amounts - [x] make sure we can stake/unstake values with decent precision (either by typing or using "max" button) ![image](https://github.com/tahowallet/dapp/assets/20949277/c4756451-b6eb-425b-8641-fea353ed4f6d)
- Loading branch information