Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-ThinhVu committed May 9, 2024
1 parent 8327b9e commit 8b8deb7
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ public GovernanceActionDetailsResponse getGovernanceActionDetails(
GovActionType.PARAMETER_CHANGE_ACTION,
GovActionType.NEW_CONSTITUTION);

List<GovActionType> govActionTypeListAllowedVoteByCc = List.of(GovActionType.NO_CONFIDENCE, GovActionType.UPDATE_COMMITTEE);
List<GovActionType> govActionTypeListAllowedVoteByCc =
List.of(GovActionType.NO_CONFIDENCE, GovActionType.UPDATE_COMMITTEE);
Boolean allowedVoteBySPO = !govActionTypeListAllowedVoteBySPO.contains(govActionType);
Boolean allowedVoteByCC = !govActionTypeListAllowedVoteByCc.contains(govActionType);
if (dRepHashOrPoolHashOrPoolView.toLowerCase().startsWith("pool")) {
Expand All @@ -241,7 +242,10 @@ public GovernanceActionDetailsResponse getGovernanceActionDetails(
}
if (governanceActionRequest.getVoterType().equals(VoterType.STAKING_POOL_KEY_HASH)
&& govActionTypeListAllowedVoteBySPO.contains(govActionType)) {
return GovernanceActionDetailsResponse.builder().allowedVoteBySPO(allowedVoteBySPO).allowedVoteByCC(allowedVoteByCC).build();
return GovernanceActionDetailsResponse.builder()
.allowedVoteBySPO(allowedVoteBySPO)
.allowedVoteByCC(allowedVoteByCC)
.build();
}
GovernanceActionDetailsResponse response =
governanceActionMapper.fromGovActionDetailsProjection(govActionDetailsProjections.get());
Expand All @@ -256,13 +260,14 @@ public GovernanceActionDetailsResponse getGovernanceActionDetails(

List<VoterType> voterTypes = new ArrayList<>();

if(VoterType.DREP_KEY_HASH.equals(governanceActionRequest.getVoterType())){
if (VoterType.DREP_KEY_HASH.equals(governanceActionRequest.getVoterType())) {
voterTypes.add(VoterType.DREP_KEY_HASH);
voterTypes.add(VoterType.DREP_SCRIPT_HASH);
} else if(VoterType.CONSTITUTIONAL_COMMITTEE_HOT_KEY_HASH.equals(governanceActionRequest.getVoterType())){
} else if (VoterType.CONSTITUTIONAL_COMMITTEE_HOT_KEY_HASH.equals(
governanceActionRequest.getVoterType())) {
voterTypes.add(VoterType.CONSTITUTIONAL_COMMITTEE_HOT_KEY_HASH);
voterTypes.add(VoterType.CONSTITUTIONAL_COMMITTEE_HOT_SCRIPT_HASH);
} else if(VoterType.STAKING_POOL_KEY_HASH.equals(governanceActionRequest.getVoterType())){
} else if (VoterType.STAKING_POOL_KEY_HASH.equals(governanceActionRequest.getVoterType())) {
voterTypes.add(VoterType.STAKING_POOL_KEY_HASH);
}

Expand Down

0 comments on commit 8b8deb7

Please sign in to comment.