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

Fix issue with balance validation on request token deep linking #5475

Merged

Conversation

eniolam1000752
Copy link
Contributor

@eniolam1000752 eniolam1000752 commented Nov 20, 2023

What was the problem?

This PR resolves #5467

How was it solved?

  • Apply token balance checks on send token form
  • Remove token balance checks on overview component
  • Fix failing unit tests

How was it tested?

  • Switch to an account without available token balance.
  • Navigate to the send modal by applying the search query params ?modal=send to the current url
  • You should be able to see the not available to token modal popup

@eniolam1000752 eniolam1000752 marked this pull request as draft November 20, 2023 18:55
@eniolam1000752 eniolam1000752 marked this pull request as ready for review November 20, 2023 20:47
@@ -115,6 +129,22 @@ const SendForm = (props) => {
return areFieldsValid && isTokenValid;
}, [amount, recipient, reference, recipientChain, sendingChain, token]);

useEffect(() => {
if (!isLoadingFeeBalance && !tokenBalanceQuery.isLoading) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move const hasTokenWithBalance calculation here (lines 89-91). Inside this if statement since this is the only part of the component which uses that logic.

oskarleonard
oskarleonard previously approved these changes Nov 21, 2023
@eniolam1000752 eniolam1000752 merged commit 418263d into release/3.0.0 Nov 21, 2023
@eniolam1000752 eniolam1000752 deleted the 5473-fix-deeplinking-issue-to-send-token branch November 21, 2023 14:51
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.

3 participants