-
Issue: The "Unit Price" input field is set to type="text". The component uses a useEffect that parses this input via parseUnits on every render.
-
Impact: If a user types any non-numeric character (e.g., "$10" or "10 USD") into the price field, ethers.parseUnits throws an error inside the useEffect, causing the entire React application to crash (White Screen of Death) immediately.
-
**Fix: Change the input type to number and implement a try/catch block or validation function before passing values to parseUnits.
-
Pinpoints a specific runtime crash vector caused by the interaction between loose HTML input types and strict blockchain library parsing within React's lifecycle.**
@kumawatkaran523 Please assign me this issue
Issue: The "Unit Price" input field is set to type="text". The component uses a useEffect that parses this input via parseUnits on every render.
Impact: If a user types any non-numeric character (e.g., "$10" or "10 USD") into the price field, ethers.parseUnits throws an error inside the useEffect, causing the entire React application to crash (White Screen of Death) immediately.
**Fix: Change the input type to number and implement a try/catch block or validation function before passing values to parseUnits.
Pinpoints a specific runtime crash vector caused by the interaction between loose HTML input types and strict blockchain library parsing within React's lifecycle.**
@kumawatkaran523 Please assign me this issue