Skip to content

Commit 200b1cc

Browse files
authored
Prefix MarketsOutput interface with I (#554)
1 parent b0d1f06 commit 200b1cc

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/clients/api/queries/getMarkets.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ export interface IGetMarketsResponse {
1111
venusRate: string;
1212
}
1313

14-
export type GetMarketsOutput = { markets: Market[]; dailyVenus: BigNumber | undefined };
14+
export interface IGetMarketsOutput {
15+
markets: Market[];
16+
dailyVenus: BigNumber | undefined;
17+
}
1518

16-
const getMarkets = async (): Promise<GetMarketsOutput> => {
19+
const getMarkets = async (): Promise<IGetMarketsOutput> => {
1720
const response = await restService<IGetMarketsResponse>({
1821
endpoint: '/governance/venus',
1922
method: 'GET',

src/clients/api/queries/useGetMarkets.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { useQuery, QueryObserverOptions } from 'react-query';
2-
import getMarkets, { GetMarketsOutput } from 'clients/api/queries/getMarkets';
2+
import getMarkets, { IGetMarketsOutput } from 'clients/api/queries/getMarkets';
33
import FunctionKey from 'constants/functionKey';
44

55
type Options = QueryObserverOptions<
6-
GetMarketsOutput,
6+
IGetMarketsOutput,
77
Error,
8-
GetMarketsOutput,
9-
GetMarketsOutput,
8+
IGetMarketsOutput,
9+
IGetMarketsOutput,
1010
FunctionKey.GET_MARKETS
1111
>;
1212

src/clients/api/queries/useUserMarketInfo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { UseQueryResult } from 'react-query';
22
import BigNumber from 'bignumber.js';
3-
import { GetMarketsOutput } from 'clients/api/queries/getMarkets';
3+
import { IGetMarketsOutput } from 'clients/api/queries/getMarkets';
44
import { TREASURY_ADDRESS } from 'config';
55
import { useVaiUser } from 'hooks/useVaiUser';
66
import { Asset, Market } from 'types';
@@ -64,7 +64,7 @@ const useUserMarketInfo = ({
6464
);
6565
const marketsMap = indexBy(
6666
(item: Market) => item.underlyingSymbol.toLowerCase(),
67-
markets as GetMarketsOutput['markets'],
67+
markets as IGetMarketsOutput['markets'],
6868
);
6969

7070
const {

0 commit comments

Comments
 (0)