File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,12 @@ export interface IGetMarketsResponse {
11
11
venusRate : string ;
12
12
}
13
13
14
- export type GetMarketsOutput = { markets : Market [ ] ; dailyVenus : BigNumber | undefined } ;
14
+ export interface IGetMarketsOutput {
15
+ markets : Market [ ] ;
16
+ dailyVenus : BigNumber | undefined ;
17
+ }
15
18
16
- const getMarkets = async ( ) : Promise < GetMarketsOutput > => {
19
+ const getMarkets = async ( ) : Promise < IGetMarketsOutput > => {
17
20
const response = await restService < IGetMarketsResponse > ( {
18
21
endpoint : '/governance/venus' ,
19
22
method : 'GET' ,
Original file line number Diff line number Diff line change 1
1
import { useQuery , QueryObserverOptions } from 'react-query' ;
2
- import getMarkets , { GetMarketsOutput } from 'clients/api/queries/getMarkets' ;
2
+ import getMarkets , { IGetMarketsOutput } from 'clients/api/queries/getMarkets' ;
3
3
import FunctionKey from 'constants/functionKey' ;
4
4
5
5
type Options = QueryObserverOptions <
6
- GetMarketsOutput ,
6
+ IGetMarketsOutput ,
7
7
Error ,
8
- GetMarketsOutput ,
9
- GetMarketsOutput ,
8
+ IGetMarketsOutput ,
9
+ IGetMarketsOutput ,
10
10
FunctionKey . GET_MARKETS
11
11
> ;
12
12
Original file line number Diff line number Diff line change 1
1
import { UseQueryResult } from 'react-query' ;
2
2
import BigNumber from 'bignumber.js' ;
3
- import { GetMarketsOutput } from 'clients/api/queries/getMarkets' ;
3
+ import { IGetMarketsOutput } from 'clients/api/queries/getMarkets' ;
4
4
import { TREASURY_ADDRESS } from 'config' ;
5
5
import { useVaiUser } from 'hooks/useVaiUser' ;
6
6
import { Asset , Market } from 'types' ;
@@ -64,7 +64,7 @@ const useUserMarketInfo = ({
64
64
) ;
65
65
const marketsMap = indexBy (
66
66
( item : Market ) => item . underlyingSymbol . toLowerCase ( ) ,
67
- markets as GetMarketsOutput [ 'markets' ] ,
67
+ markets as IGetMarketsOutput [ 'markets' ] ,
68
68
) ;
69
69
70
70
const {
You can’t perform that action at this time.
0 commit comments