From 69a210c4cee2d6060b498dbd97c280ee0fce360f Mon Sep 17 00:00:00 2001 From: Brayan Vargas <86427419+b-avb@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:32:09 -0500 Subject: [PATCH] Fix input breaks after dot (#85) * fix: input breaks after dot * chore: remove prints --- src/components/molecules/actions/voting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/actions/voting.rs b/src/components/molecules/actions/voting.rs index 8049ddb..dd849c8 100644 --- a/src/components/molecules/actions/voting.rs +++ b/src/components/molecules/actions/voting.rs @@ -67,7 +67,7 @@ pub fn VotingAction(props: VotingProps) -> Element { key: "None".to_string(), value: "None".to_string(), }), - input: if vote.balance / KUSAMA_PRECISION_DECIMALS > 0 { (vote.balance / KUSAMA_PRECISION_DECIMALS).to_string() } else { String::new() }, + input: if vote.balance > 0 { (vote.balance as f64 / KUSAMA_PRECISION_DECIMALS as f64).to_string() } else { String::new() }, }, placeholder: translate!(i18, "initiative.steps.actions.voting_open_gov.standard.balance"), right_text: {