@@ -40,6 +40,7 @@ import { getPublicKey } from './transactions/requests/getPublicKey';
4040import { getICOPublicKey } from './transactions/requests/getICOPublicKey' ;
4141// Voting requests
4242import { createWalletSignature } from './voting/requests/createWalletSignature' ;
43+ import { getCatalystFund } from './voting/requests/getCatalystFund' ;
4344// Wallets requests
4445import { updateSpendingPassword } from './wallets/requests/updateSpendingPassword' ;
4546import { updateByronSpendingPassword } from './wallets/requests/updateByronSpendingPassword' ;
@@ -204,6 +205,8 @@ import type {
204205import type {
205206 CreateVotingRegistrationRequest ,
206207 CreateWalletSignatureRequest ,
208+ GetCatalystFundResponse ,
209+ CatalystFund ,
207210} from './voting/types' ;
208211import type { StakePoolProps } from '../domains/StakePool' ;
209212import type { FaultInjectionIpcRequest } from '../../../common/types/cardano-node.types' ;
@@ -2931,6 +2934,42 @@ export default class AdaApi {
29312934 fakeStakePoolsJson : Array < StakePool >
29322935 ) => void ;
29332936 setStakePoolsFetchingFailed : ( ) => void ;
2937+ getCatalystFund = async ( ) : Promise < CatalystFund > => {
2938+ logger . debug ( 'AdaApi::getCatalystFund called' , { } ) ;
2939+
2940+ try {
2941+ const catalystFund = await getCatalystFund ( ) ;
2942+
2943+ logger . debug ( 'AdaApi::getCatalystFund success' , {
2944+ catalystFund,
2945+ } ) ;
2946+
2947+ return {
2948+ current : {
2949+ number : catalystFund . id + 1 ,
2950+ startTime : new Date ( catalystFund . fund_start_time ) ,
2951+ endTime : new Date ( catalystFund . fund_end_time ) ,
2952+ resultsTime : new Date (
2953+ catalystFund . chain_vote_plans ?. [ 0 ] ?. chain_committee_end_time
2954+ ) ,
2955+ registrationSnapshotTime : new Date (
2956+ catalystFund . registration_snapshot_time
2957+ ) ,
2958+ } ,
2959+ next : {
2960+ number : catalystFund . id + 2 ,
2961+ startTime : new Date ( catalystFund . next_fund_start_time ) ,
2962+ registrationSnapshotTime : new Date (
2963+ catalystFund . next_registration_snapshot_time
2964+ ) ,
2965+ } ,
2966+ } ;
2967+ } catch ( error ) {
2968+ logger . error ( 'AdaApi::getCatalystFund error' , {
2969+ error,
2970+ } ) ;
2971+ }
2972+ } ;
29342973} // ========== TRANSFORM SERVER DATA INTO FRONTEND MODELS =========
29352974
29362975const _createWalletFromServerData = action (
0 commit comments