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(bridge): redeem error mismatch #390

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Conversation

danielsimao
Copy link
Member

@danielsimao danielsimao commented Jul 15, 2022

This PR solves this ticket.

The problem was that the validateForm function is called onChange of the Input. The redeemFee calculation needs the current input value, meaning that it has a direct dependency to it. When calling validateForm, this function was using the most recent input value, while the redeemFee was still using the previous input value. Thus, creating a state sync issue. The quickest and simpler solution was bring the calculation inside validateForm in order to use the most recent input value instead.

Here is a video of the end result.

@vercel
Copy link

vercel bot commented Jul 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
interbtc-ui-interlay ✅ Ready (Inspect) Visit Preview Jul 15, 2022 at 3:34PM (UTC)
interbtc-ui-interlay-testnet ✅ Ready (Inspect) Visit Preview Jul 15, 2022 at 3:34PM (UTC)
interbtc-ui-kintsugi ✅ Ready (Inspect) Visit Preview Jul 15, 2022 at 3:34PM (UTC)
interbtc-ui-kintsugi-testnet ✅ Ready (Inspect) Visit Preview Jul 15, 2022 at 3:34PM (UTC)

@github-actions
Copy link

Running Lighthouse audit...

Copy link
Collaborator

@tomjeatt tomjeatt left a comment

Choose a reason for hiding this comment

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

👍

@danielsimao danielsimao merged commit 9290cd9 into master Jul 18, 2022
@danielsimao danielsimao deleted the rui/redeem-error-state-fix branch July 18, 2022 16:14
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.

None yet

2 participants