Skip to content

fix/292-reset-amount-on-tab-switch - #411

Closed
extolkom wants to merge 7 commits into
Junirezz:mainfrom
extolkom:fix/292-reset-amount-on-tab-switch
Closed

fix/292-reset-amount-on-tab-switch#411
extolkom wants to merge 7 commits into
Junirezz:mainfrom
extolkom:fix/292-reset-amount-on-tab-switch

Conversation

@extolkom

Copy link
Copy Markdown
Contributor

Closes #292
Summary
Fixed a UX bug where the amount field and validation errors were not reset when switching between Deposit and Withdraw tabs in VaultDashboard.tsx.
Changes

Added setAmount("") and setTouched(INITIAL_TOUCHED_STATE) to the onValueChange callback on the Tabs component (line ~460)

Before
Typing 500 in Deposit tab then switching to Withdraw would show the same value and any validation errors immediately, before the user had interacted with the Withdraw tab.
After
Switching tabs clears the amount field and resets touched state so no stale errors are shown

@drips-wave

drips-wave Bot commented Apr 27, 2026

Copy link
Copy Markdown

@extolkom Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@extolkom

Copy link
Copy Markdown
Contributor Author

Hi @Junirezz 👋
Just wanted to flag that the failing CI checks on this PR are pre-existing issues in the base repo and are not caused by my changes.
My PR only touches:

frontend/src/components/VaultDashboard.test.tsx — rewrote tests for the tab-switch reset behavior
frontend/vite.config.ts — removed a duplicate import path from "path" line

The failing checks relate to errors in VaultDashboard.tsx, Portfolio.tsx, vaultApi.ts, cypress.config.ts, and SessionExpiryWarning.test.tsx — none of which are files I modified.
Happy to fix those too if needed, but wanted to flag this first before doing extra work outside the scope of this issue. Let me know how you'd like to proceed!

@Junirezz Junirezz closed this Apr 27, 2026
Junirezz pushed a commit that referenced this pull request Apr 27, 2026
@extolkom
extolkom deleted the fix/292-reset-amount-on-tab-switch branch April 28, 2026 08:59
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.

[Frontend] Deposit/Withdraw amount field not reset when switching tabs in VaultDashboard

2 participants