File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
govtool/frontend/src/context Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ changes.
2121- Allow searching for yourself in DRep Directory [ Issue 2993] ( https://github.com/IntersectMBO/govtool/issues/2993 )
2222- Add mathematical styling for governance actions [ Issue 2984] ( https://github.com/IntersectMBO/govtool/issues/2984 )
2323- Add script to update GovTool version
24+ - Add ` isStakeKeyRegistered ` for the usage by pillars [ Issue 2384] ( https://github.com/IntersectMBO/govtool/issues/2384 )
2425
2526### Fixed
2627
Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ interface CardanoContextType {
249249 ) => Promise < VotingBuilder > ;
250250 pendingTransaction : PendingTransaction ;
251251 isPendingTransaction : ( ) => boolean ;
252+ isStakeKeyRegistered : ( ) => boolean ;
252253 buildNewInfoGovernanceAction : (
253254 infoProps : InfoProps ,
254255 ) => Promise < VotingProposalBuilder | undefined > ;
@@ -347,6 +348,12 @@ const CardanoProvider = (props: Props) => {
347348 }
348349 } ;
349350
351+ /**
352+ * Checks if there are any registered stake keys.
353+ * @returns {boolean } True if there are registered stake keys, false otherwise.
354+ */
355+ const isStakeKeyRegistered = ( ) => ! ! registeredStakeKeysListState . length ;
356+
350357 const enable = useCallback (
351358 async ( walletName : string ) => {
352359 setIsEnableLoading ( walletName ) ;
@@ -1474,6 +1481,7 @@ const CardanoProvider = (props: Props) => {
14741481 isEnabled,
14751482 isMainnet,
14761483 isPendingTransaction,
1484+ isStakeKeyRegistered,
14771485 pendingTransaction,
14781486 pubDRepKey,
14791487 registeredStakeKeysListState,
@@ -1507,6 +1515,7 @@ const CardanoProvider = (props: Props) => {
15071515 isEnabled ,
15081516 isMainnet ,
15091517 isPendingTransaction ,
1518+ isStakeKeyRegistered ,
15101519 pendingTransaction ,
15111520 pubDRepKey ,
15121521 registeredStakeKeysListState ,
You can’t perform that action at this time.
0 commit comments