File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,6 @@ const FinalizeStep: FC<FinalizeStepProps> = ({
6060 handleClaimSuccess,
6161 claimPayload,
6262 canClaimStakes,
63- userStake,
64- hasUserVoted,
6563 } = useClaimConfig ( actionData , startPollingAction , refetchAction ) ;
6664
6765 const isMotionFinalized = actionData . motionData . isFinalized ;
@@ -134,10 +132,15 @@ const FinalizeStep: FC<FinalizeStepProps> = ({
134132 */
135133 const wrongMotionState = ! motionState || motionState === MotionState . Invalid ;
136134
137- const successStatusText =
138- ! userStake && hasUserVoted
139- ? 'motion.finalizeStep.votedAndNotStaked.statusText'
140- : 'motion.finalizeStep.statusText' ;
135+ const canBeExecuted =
136+ ! isPolling &&
137+ ! isMotionFailedNotFinalizable &&
138+ ! isMotionFinalized &&
139+ ! isMotionAgreement ;
140+
141+ const successStatusText = canBeExecuted
142+ ? 'motion.finalizeStep.passedAction'
143+ : 'motion.finalizeStep.completedStatusText' ;
141144
142145 const statusText = isMotionFailedNotFinalizable
143146 ? 'motion.finalizeStep.failed.statusText'
Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ export const useClaimConfig = (
9797 databaseMotionId,
9898 remainingStakes,
9999 motionStateHistory,
100- voterRecord,
101100 } ,
102101 transactionHash,
103102 } = actionData ;
@@ -119,7 +118,7 @@ export const useClaimConfig = (
119118 actionData . motionData . motionStateHistory . hasFailedNotFinalizable ;
120119
121120 const userStake = usersStakes . find ( ( { address } ) => address === userAddress ) ;
122- const hasUserVoted = voterRecord . some ( ( item ) => item . address === userAddress ) ;
121+
123122 const stakerReward = stakerRewards . find (
124123 ( { address } ) => address === userAddress ,
125124 ) ;
@@ -305,7 +304,5 @@ export const useClaimConfig = (
305304 handleClaimSuccess,
306305 claimPayload,
307306 canClaimStakes,
308- userStake,
309- hasUserVoted,
310307 } ;
311308} ;
Original file line number Diff line number Diff line change 14281428 "motion.staking.accordion.title.show" : " Show staking information" ,
14291429 "motion.staking.accordion.title.hide" : " Hide staking information" ,
14301430 "motion.finalize.label" : " Finalize" ,
1431- "motion.finalizeStep.statusText " : " Action has passed and is now complete." ,
1431+ "motion.finalizeStep.completedStatusText " : " Action has passed and is now complete." ,
14321432 "motion.finalizeStep.claimable.statusText" : " Action has passed and has been executed." ,
14331433 "motion.finalizeStep.title" : " Overview" ,
14341434 "motion.finalizeStep.failedNotAchieving.statusText" : " Action failed due to not achieving required stake." ,
14351435 "motion.finalizeStep.failed.statusText" : " Action failed and cannot be executed." ,
1436- "motion.finalizeStep.votedAndNotStaked.statusText " : " Action has passed and can be executed." ,
1436+ "motion.finalizeStep.passedAction " : " Action has passed and can be executed." ,
14371437 "motion.finalizeStep.staked" : " Your stake" ,
14381438 "motion.finalizeStep.winnings" : " Your reward" ,
14391439 "motion.finalizeStep.total" : " Total" ,
You can’t perform that action at this time.
0 commit comments