@dodoex/widgets 3.10.7 → 3.10.8-cp.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/bundle-j598CJmN.css +308 -0
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-Cak2QzR9.js → helper-Bfv_uo9c.js} +1 -1
- package/dist/{helper-CRNTsErS.cjs → helper-DLEDNtmw.cjs} +1 -1
- package/dist/index-6SOAKqWf.js +31 -0
- package/dist/{index-DBb03z_0.cjs → index-BS3GhNBu.cjs} +5 -5
- package/dist/index-C6SKSR78.cjs +31 -0
- package/dist/index-CBZd2I6N.js +78 -0
- package/dist/{index-DiafEjf0.js → index-CJOiLF2V.js} +1 -1
- package/dist/{index-Bo9URTrw.cjs → index-JpxDKypQ.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/CopyTooltipToast.d.ts +3 -2
- package/dist/types/components/CountdownTime.d.ts +3 -0
- package/dist/types/components/RiskDialog.d.ts +4 -4
- package/dist/types/components/RiskQuestionDialog.d.ts +13 -0
- package/dist/types/components/Swap/components/TokenCard/EtherTokenSelect.d.ts +8 -0
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +3 -1
- package/dist/types/components/Table.d.ts +5 -1
- package/dist/types/components/Widget/index.d.ts +8 -1
- package/dist/types/constants/api.d.ts +4 -1
- package/dist/types/constants/localstorage.d.ts +7 -2
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +1 -0
- package/dist/types/hooks/Submission/types.d.ts +10 -1
- package/dist/types/hooks/contract/useSignMessage.d.ts +6 -0
- package/dist/types/hooks/useCPFavorites.d.ts +44 -0
- package/dist/types/hooks/useRiskDialogState.d.ts +6 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/router/types.d.ts +19 -1
- package/dist/types/utils/time.d.ts +2 -0
- package/dist/types/utils/wallet.d.ts +12 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/ConfirmDialog.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/ErrorTip.d.ts +5 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/IntroSettings.d.ts +13 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/IntroSettingsConfirmDialog.d.ts +14 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/OptionalSettings.d.ts +12 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/PriceSettings.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/RichTextEditor/index.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/TimeSettings.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/Title.d.ts +5 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useCreateCrowdpooling.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useCreateCrowdpoolingState.d.ts +9 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useGetCPIntro.d.ts +16 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useIntroSettingsValidation.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useOptionalSettingsValidation.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/usePriceSettingsValidation.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useSaveCPIntro.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useTimeSettingsValidation.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/hooks/useUploadImages.d.ts +5 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/index.d.ts +1 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/reducers.d.ts +91 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/utils/imageCompression.d.ts +10 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/ActionCard.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/BaseInfo.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/CrowdpoolingInfo.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/ProjectInfo.d.ts +4 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/RemoveDialog.d.ts +16 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/SettleConfirmDialog.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/Timeline.d.ts +12 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/TokenInfo.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useBidCp.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useCPDetail.d.ts +13 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useCPDynamicStatus.d.ts +9 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useClaimCp.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useFetchCpVote.d.ts +169 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useRemoveCp.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/hooks/useSettleCp.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/index.d.ts +4 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/CPCard.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/CrowdpoolingOverview.d.ts +5 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/Dashboard.d.ts +18 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/LaunchCampaign.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/MyCrowdpooling.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/NavTabs.d.ts +11 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/VoteConfirm.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/components/VoteTopList.d.ts +4 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingList/index.d.ts +12 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/components/OperationButton.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/components/PriceCell.d.ts +9 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/components/ProgressCell.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/components/StatusTag.d.ts +13 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/hooks/useMyCPList.d.ts +1 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/index.d.ts +1 -0
- package/dist/types/widgets/CrowdpoolingWidget/helper.d.ts +29 -0
- package/dist/types/widgets/CrowdpoolingWidget/hooks/useCpCountdownTime.d.ts +14 -0
- package/dist/types/widgets/CrowdpoolingWidget/index.d.ts +1 -0
- package/dist/types/widgets/CrowdpoolingWidget/types.d.ts +105 -0
- package/package.json +13 -3
- package/dist/assets/bundle-DSSoJu9z.css +0 -297
- package/dist/index-BYPAhy0y.js +0 -31
- package/dist/index-C6SjNO4P.js +0 -78
- package/dist/index-DY5cuvxL.cjs +0 -31
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function useGetCPIntro(chainId: number | undefined, crowdpoolingAddress: string | undefined): import("@tanstack/react-query").UseQueryResult<{
|
|
2
|
+
id: string;
|
|
3
|
+
chainId: number;
|
|
4
|
+
name?: string;
|
|
5
|
+
owner: string;
|
|
6
|
+
crowdpoolingAddress: string;
|
|
7
|
+
coverImg?: string;
|
|
8
|
+
tokenName?: string;
|
|
9
|
+
website?: string;
|
|
10
|
+
twitter?: string;
|
|
11
|
+
telegram?: string;
|
|
12
|
+
discord?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
createAt: string;
|
|
15
|
+
updateAt: string;
|
|
16
|
+
} | null, Error>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StateProps } from '../reducers';
|
|
2
|
+
interface IntroSettingsValidationResult {
|
|
3
|
+
errorKey: string;
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
reCheck: (getErrorState?: (isError: boolean) => void) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useIntroSettingsValidation: (state: StateProps) => IntroSettingsValidationResult;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StateProps } from '../reducers';
|
|
2
|
+
interface TimeSettingsValidationResult {
|
|
3
|
+
errorKey: string;
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
reCheck: (getErrorState?: (isError: boolean) => void) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useTimeSettingsValidation: (state: StateProps) => TimeSettingsValidationResult;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CrowdpoolingCreate(): JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token/type';
|
|
3
|
+
export interface PriceSettingsType {
|
|
4
|
+
baseToken: TokenInfo | null;
|
|
5
|
+
quoteToken: TokenInfo | null;
|
|
6
|
+
baseTokenShowDecimals?: number;
|
|
7
|
+
quoteTokenShowDecimals?: number;
|
|
8
|
+
price: string | null;
|
|
9
|
+
baseTokenAmount: string;
|
|
10
|
+
salesRatio: number | null;
|
|
11
|
+
baseTokenSalesAmount: BigNumber;
|
|
12
|
+
quoteCap: number | null;
|
|
13
|
+
k: number;
|
|
14
|
+
hardcapPrice: BigNumber | null;
|
|
15
|
+
targetTakerTokenDisplayAmount: BigNumber;
|
|
16
|
+
}
|
|
17
|
+
export interface TimeSettingsType {
|
|
18
|
+
bidStartTime: number | null;
|
|
19
|
+
bidEndTime: number | null;
|
|
20
|
+
freezeDuration: number;
|
|
21
|
+
}
|
|
22
|
+
export interface OptionalSettingsType {
|
|
23
|
+
calmEndTime: number | null;
|
|
24
|
+
delayClaim: boolean;
|
|
25
|
+
initClaimRate: number | null;
|
|
26
|
+
claimStartTime: number | null;
|
|
27
|
+
freeCycle: number | null;
|
|
28
|
+
overflowLimit: boolean;
|
|
29
|
+
poolFeeRate: number;
|
|
30
|
+
isHardCap: boolean;
|
|
31
|
+
hardCapPricePerUser: number | null;
|
|
32
|
+
liquidityAddedPercent: number | null;
|
|
33
|
+
liquidityPoolType: 'dvm' | 'cp';
|
|
34
|
+
creator: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface IntroSettingsType {
|
|
37
|
+
projectName: string;
|
|
38
|
+
coverImageUrl: string;
|
|
39
|
+
description: string;
|
|
40
|
+
websiteUrl: string;
|
|
41
|
+
twitterUrl: string;
|
|
42
|
+
telegramUrl: string;
|
|
43
|
+
discordUrl: string;
|
|
44
|
+
enabledSocialLinks: {
|
|
45
|
+
website: boolean;
|
|
46
|
+
twitter: boolean;
|
|
47
|
+
discord: boolean;
|
|
48
|
+
telegram: boolean;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface StateProps {
|
|
52
|
+
curStep: StepStatus;
|
|
53
|
+
priceSettings: PriceSettingsType;
|
|
54
|
+
timeSettings: TimeSettingsType;
|
|
55
|
+
optionalSettings: OptionalSettingsType;
|
|
56
|
+
introSettings: IntroSettingsType;
|
|
57
|
+
}
|
|
58
|
+
export declare enum Types {
|
|
59
|
+
UpdateCurStep = 0,
|
|
60
|
+
UpdatePriceSettings = 1,
|
|
61
|
+
UpdateTimeSettings = 2,
|
|
62
|
+
UpdateOptionalSettings = 3,
|
|
63
|
+
UpdateIntroSettings = 4,
|
|
64
|
+
Cover = 5
|
|
65
|
+
}
|
|
66
|
+
export declare enum StepStatus {
|
|
67
|
+
PriceSettings = 1,
|
|
68
|
+
TimeSettings = 2,
|
|
69
|
+
OptionalSettings = 3,
|
|
70
|
+
IntroSettings = 4
|
|
71
|
+
}
|
|
72
|
+
type Payload = {
|
|
73
|
+
[Types.UpdateCurStep]: StepStatus;
|
|
74
|
+
[Types.UpdatePriceSettings]: Partial<PriceSettingsType>;
|
|
75
|
+
[Types.UpdateTimeSettings]: Partial<TimeSettingsType>;
|
|
76
|
+
[Types.UpdateOptionalSettings]: Partial<OptionalSettingsType>;
|
|
77
|
+
[Types.UpdateIntroSettings]: Partial<IntroSettingsType>;
|
|
78
|
+
[Types.Cover]: Partial<StateProps>;
|
|
79
|
+
};
|
|
80
|
+
export type Actions = Payload[keyof Payload];
|
|
81
|
+
export declare const OneDayTime: number;
|
|
82
|
+
export declare const initPriceSettings: PriceSettingsType;
|
|
83
|
+
export declare const initTimeSettings: TimeSettingsType;
|
|
84
|
+
export declare const initOptionalSettings: OptionalSettingsType;
|
|
85
|
+
export declare const initIntroSettings: IntroSettingsType;
|
|
86
|
+
export declare const initState: StateProps;
|
|
87
|
+
export declare function reducer(state: StateProps, action: {
|
|
88
|
+
type: Types;
|
|
89
|
+
payload: any;
|
|
90
|
+
}): StateProps;
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ImageCompressionOptions {
|
|
2
|
+
quality?: number;
|
|
3
|
+
maxSize?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface CompressorOptions {
|
|
6
|
+
quality?: number;
|
|
7
|
+
success?: (result: File) => void;
|
|
8
|
+
error?: (err: Error) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function compressImage(file: File, userOptions?: ImageCompressionOptions): Promise<File>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CPDetail, CPStatusType } from '../../types';
|
|
2
|
+
interface ActionCardProps {
|
|
3
|
+
detail: CPDetail | undefined;
|
|
4
|
+
status: CPStatusType;
|
|
5
|
+
refetch: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ActionCard({ detail, status, refetch: refetchDetail, }: ActionCardProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
export default function RemoveDialog({ token, baseTokenPosition, balanceLoading, chainId, open, loading, onClose, onConfirm, }: {
|
|
5
|
+
token: TokenInfo | undefined | null;
|
|
6
|
+
baseTokenPosition: BigNumber;
|
|
7
|
+
balanceLoading: boolean;
|
|
8
|
+
chainId: ChainId | undefined;
|
|
9
|
+
open: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
onConfirm: (params: {
|
|
13
|
+
sharesAmountParseUnit: string;
|
|
14
|
+
isUnWrap: boolean;
|
|
15
|
+
}) => void;
|
|
16
|
+
}): JSX.Element;
|
package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingDetail/components/SettleConfirmDialog.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export default function SettleConfirmDialog({ chainId, open, loading, onClose, onConfirm, }: {
|
|
3
|
+
chainId: ChainId | undefined;
|
|
4
|
+
open: boolean;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CPStatusType } from '../../types';
|
|
2
|
+
export declare enum TimelineType {
|
|
3
|
+
Upcoming = "Upcoming",
|
|
4
|
+
OnSale = "OnSale",
|
|
5
|
+
Settling = "Settling",
|
|
6
|
+
Claimable = "Claimable"
|
|
7
|
+
}
|
|
8
|
+
interface IProps {
|
|
9
|
+
status: CPStatusType;
|
|
10
|
+
}
|
|
11
|
+
export declare const Timeline: import("react").MemoExoticComponent<({ status }: IProps) => JSX.Element>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CPDetail } from '../../types';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
interface UseBidCpProps {
|
|
4
|
+
quoteAmount: string;
|
|
5
|
+
qtToken: TokenInfo | undefined | null;
|
|
6
|
+
detail: CPDetail | undefined;
|
|
7
|
+
successBack?: () => void;
|
|
8
|
+
submittedBack?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useBidCp({ quoteAmount, qtToken, detail, successBack, submittedBack, }: UseBidCpProps): import("@tanstack/react-query").UseMutationResult<boolean, Error, void, unknown>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CPDetail } from '../../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
chainId: number;
|
|
5
|
+
account?: string | null;
|
|
6
|
+
};
|
|
7
|
+
export declare function useCPDetail({ id, chainId }: Props): {
|
|
8
|
+
detail: CPDetail | undefined;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
refetch: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CPDetail } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
detail: CPDetail | undefined;
|
|
4
|
+
successBack?: () => void;
|
|
5
|
+
submittedBack?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useClaimCp({ detail, successBack, submittedBack }: Props): import("@tanstack/react-query").UseMutationResult<boolean, Error, void, unknown>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
export declare function useFetchCpVote({ chainId, cpAddress, }: {
|
|
2
|
+
chainId: number | undefined;
|
|
3
|
+
cpAddress: string | undefined;
|
|
4
|
+
}): {
|
|
5
|
+
iopCrowdpoolings: {
|
|
6
|
+
votes: {
|
|
7
|
+
creator: string | null | undefined;
|
|
8
|
+
id?: number | null;
|
|
9
|
+
}[];
|
|
10
|
+
address?: string | null;
|
|
11
|
+
}[];
|
|
12
|
+
voteAccounts: string[];
|
|
13
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery;
|
|
14
|
+
error: Error;
|
|
15
|
+
isError: true;
|
|
16
|
+
isPending: false;
|
|
17
|
+
isLoading: false;
|
|
18
|
+
isLoadingError: false;
|
|
19
|
+
isRefetchError: true;
|
|
20
|
+
isSuccess: false;
|
|
21
|
+
status: "error";
|
|
22
|
+
dataUpdatedAt: number;
|
|
23
|
+
errorUpdatedAt: number;
|
|
24
|
+
failureCount: number;
|
|
25
|
+
failureReason: Error | null;
|
|
26
|
+
errorUpdateCount: number;
|
|
27
|
+
isFetched: boolean;
|
|
28
|
+
isFetchedAfterMount: boolean;
|
|
29
|
+
isFetching: boolean;
|
|
30
|
+
isInitialLoading: boolean;
|
|
31
|
+
isPaused: boolean;
|
|
32
|
+
isPlaceholderData: boolean;
|
|
33
|
+
isRefetching: boolean;
|
|
34
|
+
isStale: boolean;
|
|
35
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
36
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
37
|
+
} | {
|
|
38
|
+
iopCrowdpoolings: {
|
|
39
|
+
votes: {
|
|
40
|
+
creator: string | null | undefined;
|
|
41
|
+
id?: number | null;
|
|
42
|
+
}[];
|
|
43
|
+
address?: string | null;
|
|
44
|
+
}[];
|
|
45
|
+
voteAccounts: string[];
|
|
46
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery;
|
|
47
|
+
error: null;
|
|
48
|
+
isError: false;
|
|
49
|
+
isPending: false;
|
|
50
|
+
isLoading: false;
|
|
51
|
+
isLoadingError: false;
|
|
52
|
+
isRefetchError: false;
|
|
53
|
+
isSuccess: true;
|
|
54
|
+
status: "success";
|
|
55
|
+
dataUpdatedAt: number;
|
|
56
|
+
errorUpdatedAt: number;
|
|
57
|
+
failureCount: number;
|
|
58
|
+
failureReason: Error | null;
|
|
59
|
+
errorUpdateCount: number;
|
|
60
|
+
isFetched: boolean;
|
|
61
|
+
isFetchedAfterMount: boolean;
|
|
62
|
+
isFetching: boolean;
|
|
63
|
+
isInitialLoading: boolean;
|
|
64
|
+
isPaused: boolean;
|
|
65
|
+
isPlaceholderData: boolean;
|
|
66
|
+
isRefetching: boolean;
|
|
67
|
+
isStale: boolean;
|
|
68
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
69
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
70
|
+
} | {
|
|
71
|
+
iopCrowdpoolings: {
|
|
72
|
+
votes: {
|
|
73
|
+
creator: string | null | undefined;
|
|
74
|
+
id?: number | null;
|
|
75
|
+
}[];
|
|
76
|
+
address?: string | null;
|
|
77
|
+
}[];
|
|
78
|
+
voteAccounts: string[];
|
|
79
|
+
data: undefined;
|
|
80
|
+
error: Error;
|
|
81
|
+
isError: true;
|
|
82
|
+
isPending: false;
|
|
83
|
+
isLoading: false;
|
|
84
|
+
isLoadingError: true;
|
|
85
|
+
isRefetchError: false;
|
|
86
|
+
isSuccess: false;
|
|
87
|
+
status: "error";
|
|
88
|
+
dataUpdatedAt: number;
|
|
89
|
+
errorUpdatedAt: number;
|
|
90
|
+
failureCount: number;
|
|
91
|
+
failureReason: Error | null;
|
|
92
|
+
errorUpdateCount: number;
|
|
93
|
+
isFetched: boolean;
|
|
94
|
+
isFetchedAfterMount: boolean;
|
|
95
|
+
isFetching: boolean;
|
|
96
|
+
isInitialLoading: boolean;
|
|
97
|
+
isPaused: boolean;
|
|
98
|
+
isPlaceholderData: boolean;
|
|
99
|
+
isRefetching: boolean;
|
|
100
|
+
isStale: boolean;
|
|
101
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
102
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
103
|
+
} | {
|
|
104
|
+
iopCrowdpoolings: {
|
|
105
|
+
votes: {
|
|
106
|
+
creator: string | null | undefined;
|
|
107
|
+
id?: number | null;
|
|
108
|
+
}[];
|
|
109
|
+
address?: string | null;
|
|
110
|
+
}[];
|
|
111
|
+
voteAccounts: string[];
|
|
112
|
+
data: undefined;
|
|
113
|
+
error: null;
|
|
114
|
+
isError: false;
|
|
115
|
+
isPending: true;
|
|
116
|
+
isLoading: true;
|
|
117
|
+
isLoadingError: false;
|
|
118
|
+
isRefetchError: false;
|
|
119
|
+
isSuccess: false;
|
|
120
|
+
status: "pending";
|
|
121
|
+
dataUpdatedAt: number;
|
|
122
|
+
errorUpdatedAt: number;
|
|
123
|
+
failureCount: number;
|
|
124
|
+
failureReason: Error | null;
|
|
125
|
+
errorUpdateCount: number;
|
|
126
|
+
isFetched: boolean;
|
|
127
|
+
isFetchedAfterMount: boolean;
|
|
128
|
+
isFetching: boolean;
|
|
129
|
+
isInitialLoading: boolean;
|
|
130
|
+
isPaused: boolean;
|
|
131
|
+
isPlaceholderData: boolean;
|
|
132
|
+
isRefetching: boolean;
|
|
133
|
+
isStale: boolean;
|
|
134
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
135
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
136
|
+
} | {
|
|
137
|
+
iopCrowdpoolings: {
|
|
138
|
+
votes: {
|
|
139
|
+
creator: string | null | undefined;
|
|
140
|
+
id?: number | null;
|
|
141
|
+
}[];
|
|
142
|
+
address?: string | null;
|
|
143
|
+
}[];
|
|
144
|
+
voteAccounts: string[];
|
|
145
|
+
data: undefined;
|
|
146
|
+
error: null;
|
|
147
|
+
isError: false;
|
|
148
|
+
isPending: true;
|
|
149
|
+
isLoadingError: false;
|
|
150
|
+
isRefetchError: false;
|
|
151
|
+
isSuccess: false;
|
|
152
|
+
status: "pending";
|
|
153
|
+
dataUpdatedAt: number;
|
|
154
|
+
errorUpdatedAt: number;
|
|
155
|
+
failureCount: number;
|
|
156
|
+
failureReason: Error | null;
|
|
157
|
+
errorUpdateCount: number;
|
|
158
|
+
isFetched: boolean;
|
|
159
|
+
isFetchedAfterMount: boolean;
|
|
160
|
+
isFetching: boolean;
|
|
161
|
+
isLoading: boolean;
|
|
162
|
+
isInitialLoading: boolean;
|
|
163
|
+
isPaused: boolean;
|
|
164
|
+
isPlaceholderData: boolean;
|
|
165
|
+
isRefetching: boolean;
|
|
166
|
+
isStale: boolean;
|
|
167
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
168
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
169
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CPDetail } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
detail: CPDetail | undefined;
|
|
4
|
+
successBack?: () => void;
|
|
5
|
+
submittedBack?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useRemoveCp({ detail, successBack, submittedBack }: Props): import("@tanstack/react-query").UseMutationResult<boolean, Error, {
|
|
8
|
+
sharesAmountParseUnit: string;
|
|
9
|
+
isUnWrap: boolean;
|
|
10
|
+
}, unknown>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
address: string | undefined;
|
|
3
|
+
successBack?: () => void;
|
|
4
|
+
submittedBack?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useSettleCp({ address, successBack, submittedBack }: Props): import("@tanstack/react-query").UseMutationResult<boolean, Error, void, unknown>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface DashboardCardProps {
|
|
2
|
+
totalBase: string;
|
|
3
|
+
address: string;
|
|
4
|
+
baseSymbol: string;
|
|
5
|
+
quoteSymbol: string;
|
|
6
|
+
quoteBaseRate: string;
|
|
7
|
+
poolQuote: string;
|
|
8
|
+
poolQuoteCap: string;
|
|
9
|
+
chain: string;
|
|
10
|
+
}
|
|
11
|
+
interface DashboardProps {
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
dashboardList?: DashboardCardProps[];
|
|
14
|
+
error?: any;
|
|
15
|
+
refresh?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export default function Dashboard({ loading, dashboardList, error, refresh, }: DashboardProps): JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum CP_STATUS {
|
|
2
|
+
WAITING = "WAITING",
|
|
3
|
+
PROGRESSING = "PROGRESSING",
|
|
4
|
+
CALMING = "CALMING",
|
|
5
|
+
ENDED = "ENDED"
|
|
6
|
+
}
|
|
7
|
+
interface MyCrowdpoolingProps {
|
|
8
|
+
onRowClick: (address: string, chainId: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export default function MyCrowdpooling({ onRowClick }: MyCrowdpoolingProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CrowdpoolingTabType } from '../../types';
|
|
2
|
+
export default function NavTabs({ value, onChange, }: {
|
|
3
|
+
value: CrowdpoolingTabType;
|
|
4
|
+
onChange: (value: CrowdpoolingTabType) => void;
|
|
5
|
+
}): ({
|
|
6
|
+
key: "all";
|
|
7
|
+
value: string;
|
|
8
|
+
} | {
|
|
9
|
+
key: "my";
|
|
10
|
+
value: string;
|
|
11
|
+
})[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CrowdpoolingTabType } from '../types';
|
|
2
|
+
export declare enum TabType {
|
|
3
|
+
ProjectCrowdpooling = 1,
|
|
4
|
+
Favorites = 2,
|
|
5
|
+
Participating = 3,
|
|
6
|
+
History = 4
|
|
7
|
+
}
|
|
8
|
+
export default function CrowdpoolingList({ params, }: {
|
|
9
|
+
params?: {
|
|
10
|
+
tab?: CrowdpoolingTabType;
|
|
11
|
+
};
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
interface PriceCellProps {
|
|
4
|
+
price: BigNumber | string;
|
|
5
|
+
baseToken: TokenInfo;
|
|
6
|
+
quoteToken: TokenInfo;
|
|
7
|
+
}
|
|
8
|
+
export declare function PriceCell({ price, baseToken, quoteToken }: PriceCellProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
interface ProgressCellProps {
|
|
3
|
+
progress: number;
|
|
4
|
+
poolQuote: string;
|
|
5
|
+
quoteToken: TokenInfo;
|
|
6
|
+
}
|
|
7
|
+
export declare function ProgressCell({ progress, poolQuote, quoteToken, }: ProgressCellProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CPStatusType } from '../../types';
|
|
2
|
+
interface StatusTagProps {
|
|
3
|
+
status: CPStatusType;
|
|
4
|
+
}
|
|
5
|
+
export declare function Tag({ status, children, }: {
|
|
6
|
+
status: CPStatusType;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
interface StatusTagProps {
|
|
10
|
+
status: CPStatusType;
|
|
11
|
+
}
|
|
12
|
+
export declare function StatusTag({ status }: StatusTagProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMyCPList(): import("@tanstack/react-query").UseQueryResult<import("../../types").Crowdpooling[], Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MyCrowdpoolingList(): JSX.Element;
|