From 4fbf20088fd0fb673b9f1e425bbf8cfa95bca5b7 Mon Sep 17 00:00:00 2001 From: wannabit-yongjoo Date: Fri, 17 Sep 2021 18:45:32 +0900 Subject: [PATCH] Android - kava lcd bug fix --- .../io/cosmostaion/dao/ChainParam.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/dao/ChainParam.java b/Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/dao/ChainParam.java index d98016a47..e2fd214a4 100644 --- a/Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/dao/ChainParam.java +++ b/Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/dao/ChainParam.java @@ -192,14 +192,12 @@ public String getMainDenom(BaseChain baseChain) { } public BigDecimal getQuorum (BaseChain baseChain) { - if (isGRPC(baseChain)) { + if (baseChain.equals(CERTIK_MAIN) || baseChain.equals(CERTIK_TEST)) { + return new BigDecimal(govTallyings.tallyparams.defaultTally.quorum).movePointRight(2); + } else if (isGRPC(baseChain)) { return new BigDecimal(govTallyings.tallyparams.quorum).movePointRight(2); - } else { - if (baseChain.equals(CERTIK_MAIN) || baseChain.equals(CERTIK_TEST)) { - return new BigDecimal(govTallyings.tallyparams.defaultTally.quorum).movePointRight(2); - } - return new BigDecimal(govTallyings.tallyparams.quorum).movePointRight(2); + return new BigDecimal(govTallyings.quorum).movePointRight(2); } } @@ -374,6 +372,16 @@ public class GovTallyings { @SerializedName("tally_params") public GovTallying tallyparams; + @SerializedName("quorum") + public String quorum; + + @SerializedName("veto") + public String veto; + + @SerializedName("threshold") + public String threshold; + + public class GovTallying { @SerializedName("quorum") public String quorum;