Skip to content

Commit

Permalink
[APP] proposal detail bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwonhyukjoon committed Aug 24, 2023
1 parent cd98b3f commit 0b82edb
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions app/src/main/java/wannabit/io/cosmostaion/dao/Param.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,7 @@ public BigDecimal getBudgetRate() {
}

public BigDecimal getQuorum(ChainConfig chainConfig, ResProposal resProposal) {
if (chainConfig.baseChain().equals(CERTIK_MAIN) && mParams.mShentuGovTallyParams != null) {
return new BigDecimal(mParams.mShentuGovTallyParams.mTallyParams.mDefaultTally.quorum);
} else if (isGRPC(chainConfig.baseChain()) && mParams.mGovTallyParams.mTallyParams != null && resProposal != null) {
if (isGRPC(chainConfig.baseChain()) && mParams.mGovTallyParams.mTallyParams != null && resProposal != null) {
if (resProposal.is_expedited) {
return new BigDecimal(mParams.mGovTallyParams.mTallyParams.expedited_threshold);
} else {
Expand Down Expand Up @@ -561,9 +559,7 @@ public BigDecimal getTurnoutBondedAmount() {

public BigDecimal getThreshold(ChainConfig chainConfig) {
if (mParams != null && mParams.mGovTallyParams != null) {
if (chainConfig.baseChain().equals(CERTIK_MAIN)) {
return new BigDecimal(mParams.mShentuGovTallyParams.mTallyParams.mDefaultTally.threshold);
} else if (isGRPC(chainConfig.baseChain())) {
if (isGRPC(chainConfig.baseChain())) {
return new BigDecimal(mParams.mGovTallyParams.mTallyParams.threshold);
} else {
return new BigDecimal(mParams.mGovTallyParams.threshold);
Expand All @@ -574,11 +570,7 @@ public BigDecimal getThreshold(ChainConfig chainConfig) {

public BigDecimal getVetoThreshold(ChainConfig chainConfig) {
if (mParams != null && mParams.mGovTallyParams != null) {
if (chainConfig.baseChain().equals(CERTIK_MAIN)) {
return new BigDecimal(mParams.mShentuGovTallyParams.mTallyParams.mDefaultTally.veto_threshold);
} else {
return new BigDecimal(mParams.mGovTallyParams.mTallyParams.veto_threshold);
}
return new BigDecimal(mParams.mGovTallyParams.mTallyParams.veto_threshold);
}
return BigDecimal.ZERO;
}
Expand Down

0 comments on commit 0b82edb

Please sign in to comment.