DCFoundation / cosmos-proposal-builder

Governance Proposal Builder for Cosmos Network chains
https://cosgov.org
1 stars 10 forks source link

Proposal Deposit does not accept decimal values #13

Open 0xpatrickdev opened 10 months ago

0xpatrickdev commented 10 months ago

If the minimum deposit is something like 0.00001, the UI will not allow the user to submit a deposit the form (only 0 and 1 are accepted). This is because step is hardcoded to 1, as it was assumed minimum deposits would also be at least 1.

Step should be calculated based on minDeposit:

https://github.com/DCFoundation/cosmos-proposal-builder/blob/e21eb88f7d0506b540c7712a29bb992f45b12fa6/src/components/DepositSection.tsx#L50-L57

0xpatrickdev commented 10 months ago

Similarly, toast banners do not show decimals. I think coinsUnit is also used here, so should fixing the above should solve this as well.