jmonteer / hegic-staking-pool-front

4 stars 1 forks source link

Deposit Amount input field works erratically #2

Open jmonteer opened 3 years ago

jmonteer commented 3 years ago

In the Deposit & Stake tab, there is an input field that takes the value the user wants to deposit in the Staking Pools.

There is an issue with input field placeholder, update of value, update of react state, ... The main issue is regarding wei conversion and BigNumber treatment + update of the input value

The task would get this button to work properly. This means:

rej156 commented 3 years ago

My 2c

Use format utilities from ethers Look into refactoring the input change stuff to using Formik

rej156 commented 3 years ago

Ah seems you do use some of the utils I believe there's also a format gwei util in the lib too so that might help

Just 2c, haven't delved fully into the issue

jmonteer commented 3 years ago

solved in next push

jmonteer commented 3 years ago

thanks for your help man!

rej156 commented 3 years ago

Code looking good! Naice bignumber method usage Clean code sir