On the two modals where we offer ETHx wrapping and unwrapping, we need to add error messaging and validations to help users navigate the process:
If the user enters a value to wrap or unwrap that is greater than the respective balance, grey out the corresponding button & change the text to "Insufficient ETH" (for wrapping) or "Insufficient ETHx" (for unwrapping)
Renable the button when the user updates the value appropriately
If the user enters a value to wrap ETH that is within .001 of their current ETH balance, display a warning "Warning: Leave enough ETH for more transactions" in simple red text below the wrap element
Clear the warning if the value is lowered to more than .001 from the current balance
This warning should not prevent the user from proceeding with the transaction
Display "Error: [cleaned error message text]" in simple red text below the respective element if an error is returned by the wallet
Clear the text if a subsequent transaction is submitted without error
If needed, wrap warning/error text to two lines and expand elements
Bonus clean up while we're here
Truncate the wallet balance displays in the Dashboard to 8 decimals
Allow the entry fields and wrap/unwrap buttons on the Dashboard to respond to smaller screen sizes (Not going for full responsive but let's give ourselves a bit more margin for smaller screens)
On the two modals where we offer ETHx wrapping and unwrapping, we need to add error messaging and validations to help users navigate the process:
Bonus clean up while we're here