File tree Expand file tree Collapse file tree 2 files changed +21
-17
lines changed
Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,16 @@ export const VotesSubmitted = ({
165165 abstainVotes = { totalAbstainVotes }
166166 notVotedVotes = { dRepNotVotedVotes }
167167 notVotedPercentage = { dRepNotVotedVotesPercentage }
168- threshold = { ( ( ) => {
169- const votingThresholdKey = getGovActionVotingThresholdKey ( {
170- govActionType : type ,
171- protocolParams,
172- voterType : "dReps" ,
173- } ) ;
174- return votingThresholdKey && epochParams ?. [ votingThresholdKey ] ;
175- } ) ( ) }
168+ threshold = {
169+ ( ( ) => {
170+ const votingThresholdKey = getGovActionVotingThresholdKey ( {
171+ govActionType : type ,
172+ protocolParams,
173+ voterType : "dReps" ,
174+ } ) ;
175+ return votingThresholdKey && epochParams ?. [ votingThresholdKey ] ;
176+ } ) ( ) as number
177+ }
176178 />
177179 ) }
178180 { areSPOVoteTotalsDisplayed ( type , isSecurityGroup ( ) ) && (
@@ -183,14 +185,16 @@ export const VotesSubmitted = ({
183185 noVotes = { poolNoVotes }
184186 noVotesPercentage = { poolNoVotesPercentage }
185187 abstainVotes = { poolAbstainVotes }
186- threshold = { ( ( ) => {
187- const votingThresholdKey = getGovActionVotingThresholdKey ( {
188- govActionType : type ,
189- protocolParams,
190- voterType : "sPos" ,
191- } ) ;
192- return votingThresholdKey && epochParams ?. [ votingThresholdKey ] ;
193- } ) ( ) }
188+ threshold = {
189+ ( ( ) => {
190+ const votingThresholdKey = getGovActionVotingThresholdKey ( {
191+ govActionType : type ,
192+ protocolParams,
193+ voterType : "sPos" ,
194+ } ) ;
195+ return votingThresholdKey && epochParams ?. [ votingThresholdKey ] ;
196+ } ) ( ) as number
197+ }
194198 />
195199 ) }
196200 { areCCVoteTotalsDisplayed ( type ) && (
Original file line number Diff line number Diff line change 88import { EpochParams } from "@/models" ;
99import { GovernanceActionType } from "@/types/governanceAction" ;
1010
11- type VotingThresholdKey = string | undefined ;
11+ type VotingThresholdKey = keyof EpochParams | undefined ;
1212
1313type GetGovActionVotingThresholdKeyOptions = {
1414 govActionType : GovernanceActionType ;
You can’t perform that action at this time.
0 commit comments