polkawallet-io / polkawallet-flutter

Replace to: https://github.com/polkawallet-io/app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Received amount" (LDOT) value should be always be 0.000 when the "Payment amount" (DOT) is invalid on "Mint L-DOT" form

ltfschoen opened this issue · comments

My Acala Mandala Address: 5DHcRs9udMCKtEmJEABY2HpECyTHHxgLL85pFFzN72SatAoQ

If I use the polkawallet-flutter mobile app and go to "Mint L-DOT" page, initially the "Payment amount" input field value is empty, so the "Received amount" that's shown is 0.000.

If I have "Balance: 0 DOT", but then enter a value of 2 DOT, it'll generate an LDOT amount (e.g. 19.669), but the "Mint L-DOT" button will remain enabled. If you then click "Mint L-DOT" it'll shown "Insufficient balance" form validation error.

If you then change the "Payment amount" input field value to an empty value again, the LDOT "Received amount" value incorrectly remains shown as 19.669, when it should instead be changed back to 0.000.

Recommendations:

If the user enters a value for the "Payment amount" and then removes that amount so it becomes empty again, then the "Received amount" should be reset to a value of 0.000 again.