@dodoex/widgets 3.19.0 → 3.20.0-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/LICENSE +674 -674
- package/README.md +70 -70
- package/dist/{34acf2e58b457195.svg → 28442382d977858a.svg} +9 -9
- package/dist/{219f8611c6c9e6e2.svg → 8de9a184d4ef0a11.svg} +6 -6
- package/dist/{44df077bd19df476.svg → b3f16b2626f03378.svg} +10 -10
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{5c5d298f247819e1.svg → ed726d76d93d4899.svg} +10 -10
- package/dist/{helper-C1OYS4SC.cjs → helper-BmahOTDE.cjs} +1 -1
- package/dist/{helper-DUWFcWe6.js → helper-D9RhyhJl.js} +1 -1
- package/dist/{index-BdB2BCQe.cjs → index-8x1SIgE_.cjs} +3 -3
- package/dist/index-BAQjyQGv.js +12 -0
- package/dist/index-BZ9xal_S.js +14 -0
- package/dist/{index-XzRE8z_c.js → index-CBydtjuU.js} +10 -10
- package/dist/index-Cp4W1Mhk.cjs +14 -0
- package/dist/{index-CQl4nYsF.cjs → index-DdG6d6qj.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/DataTable.d.ts +16 -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 +8 -5
- package/dist/types/constants/localstorage.d.ts +7 -2
- package/dist/types/hooks/ConnectWallet/useCurrentChainId.d.ts +1 -1
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +3 -2
- package/dist/types/hooks/Submission/types.d.ts +10 -1
- package/dist/types/hooks/Swap/useForecastSlippageList.d.ts +142 -6
- package/dist/types/hooks/Swap/useSwapSlippage.d.ts +143 -7
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +248 -12
- package/dist/types/hooks/Token/useSelectChainList.d.ts +2 -2
- package/dist/types/hooks/Token/useTokenStatus.d.ts +4 -4
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +21 -1
- package/dist/types/hooks/contract/useSignMessage.d.ts +6 -0
- package/dist/types/hooks/useCPFavorites.d.ts +46 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +3 -2
- package/dist/types/hooks/useRiskDialogState.d.ts +6 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/router/types.d.ts +19 -1
- package/dist/types/utils/chains.d.ts +1 -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 +12 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/ErrorTip.d.ts +6 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/IntroSettings.d.ts +14 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/IntroSettingsConfirmDialog.d.ts +15 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/OptionalSettings.d.ts +13 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/PriceSettings.d.ts +12 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/RichTextEditor/index.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingCreate/components/TimeSettings.d.ts +12 -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 +28 -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 +2 -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 +214 -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 +5 -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 +12 -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 +13 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/CreatorsTable.d.ts +8 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/CrowdpoolingAmountChart.d.ts +5 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/DepthAndLiquidityChart.d.ts +10 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/EmptyChart.d.ts +4 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/ParametersTable.d.ts +10 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/SwapsTable.d.ts +7 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/hooks/useCPPmmState.d.ts +17 -0
- package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/index.d.ts +5 -0
- package/dist/types/widgets/CrowdpoolingWidget/MyCrowdpoolingList/components/OperationButton.d.ts +7 -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/dist/types/widgets/MiningWidget/MiningCreate/hooks/usePoolPairList.d.ts +28 -2
- package/dist/types/widgets/MiningWidget/MiningCreate/utils.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/MiningList/hooks/useStatusAndStartBlockNumber.d.ts +2 -1
- package/dist/types/widgets/MiningWidget/MiningList/utils.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/helper.d.ts +2 -1
- package/dist/types/widgets/MiningWidget/hooks/useMiningItem.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useMiningList.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useMyCreatedMiningList.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +9 -3
- package/dist/types/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +8 -2
- package/dist/types/widgets/MiningWidget/hooks/utils.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/components/StatBarChart.d.ts +13 -7
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +122 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +336 -8
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +156 -8
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +252 -8
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +3 -2
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +43 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +11 -5
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +8 -8
- package/dist/types/widgets/PoolWidget/hooks/contract/useWithdrawInfo.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +13 -13
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +422 -9
- package/dist/types/widgets/PoolWidget/hooks/useUniV2CreatePairs.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +5 -2
- package/dist/types/widgets/PoolWidget/utils.d.ts +3 -3
- package/dist/{assets/bundle-BBymdwHN.css → widgets.css} +4 -0
- package/package.json +167 -162
- package/dist/index-BGe7caLE.js +0 -12
- package/dist/index-Cm0O00ow.cjs +0 -14
- package/dist/index-ZV1FQySp.js +0 -14
|
@@ -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,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): import("react").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
|
+
}): import("react").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
|
+
}): import("react").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) => import("react").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,214 @@
|
|
|
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
|
+
isPlaceholderData: false;
|
|
22
|
+
status: "error";
|
|
23
|
+
dataUpdatedAt: number;
|
|
24
|
+
errorUpdatedAt: number;
|
|
25
|
+
failureCount: number;
|
|
26
|
+
failureReason: Error | null;
|
|
27
|
+
errorUpdateCount: number;
|
|
28
|
+
isFetched: boolean;
|
|
29
|
+
isFetchedAfterMount: boolean;
|
|
30
|
+
isFetching: boolean;
|
|
31
|
+
isInitialLoading: boolean;
|
|
32
|
+
isPaused: boolean;
|
|
33
|
+
isRefetching: boolean;
|
|
34
|
+
isStale: boolean;
|
|
35
|
+
isEnabled: boolean;
|
|
36
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
37
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
38
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery>;
|
|
39
|
+
} | {
|
|
40
|
+
iopCrowdpoolings: {
|
|
41
|
+
votes: {
|
|
42
|
+
creator: string | null | undefined;
|
|
43
|
+
id?: number | null;
|
|
44
|
+
}[];
|
|
45
|
+
address?: string | null;
|
|
46
|
+
}[];
|
|
47
|
+
voteAccounts: string[];
|
|
48
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery;
|
|
49
|
+
error: null;
|
|
50
|
+
isError: false;
|
|
51
|
+
isPending: false;
|
|
52
|
+
isLoading: false;
|
|
53
|
+
isLoadingError: false;
|
|
54
|
+
isRefetchError: false;
|
|
55
|
+
isSuccess: true;
|
|
56
|
+
isPlaceholderData: false;
|
|
57
|
+
status: "success";
|
|
58
|
+
dataUpdatedAt: number;
|
|
59
|
+
errorUpdatedAt: number;
|
|
60
|
+
failureCount: number;
|
|
61
|
+
failureReason: Error | null;
|
|
62
|
+
errorUpdateCount: number;
|
|
63
|
+
isFetched: boolean;
|
|
64
|
+
isFetchedAfterMount: boolean;
|
|
65
|
+
isFetching: boolean;
|
|
66
|
+
isInitialLoading: boolean;
|
|
67
|
+
isPaused: boolean;
|
|
68
|
+
isRefetching: boolean;
|
|
69
|
+
isStale: boolean;
|
|
70
|
+
isEnabled: boolean;
|
|
71
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
72
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
73
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery>;
|
|
74
|
+
} | {
|
|
75
|
+
iopCrowdpoolings: {
|
|
76
|
+
votes: {
|
|
77
|
+
creator: string | null | undefined;
|
|
78
|
+
id?: number | null;
|
|
79
|
+
}[];
|
|
80
|
+
address?: string | null;
|
|
81
|
+
}[];
|
|
82
|
+
voteAccounts: string[];
|
|
83
|
+
data: undefined;
|
|
84
|
+
error: Error;
|
|
85
|
+
isError: true;
|
|
86
|
+
isPending: false;
|
|
87
|
+
isLoading: false;
|
|
88
|
+
isLoadingError: true;
|
|
89
|
+
isRefetchError: false;
|
|
90
|
+
isSuccess: false;
|
|
91
|
+
isPlaceholderData: false;
|
|
92
|
+
status: "error";
|
|
93
|
+
dataUpdatedAt: number;
|
|
94
|
+
errorUpdatedAt: number;
|
|
95
|
+
failureCount: number;
|
|
96
|
+
failureReason: Error | null;
|
|
97
|
+
errorUpdateCount: number;
|
|
98
|
+
isFetched: boolean;
|
|
99
|
+
isFetchedAfterMount: boolean;
|
|
100
|
+
isFetching: boolean;
|
|
101
|
+
isInitialLoading: boolean;
|
|
102
|
+
isPaused: boolean;
|
|
103
|
+
isRefetching: boolean;
|
|
104
|
+
isStale: boolean;
|
|
105
|
+
isEnabled: boolean;
|
|
106
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
107
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
108
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery>;
|
|
109
|
+
} | {
|
|
110
|
+
iopCrowdpoolings: {
|
|
111
|
+
votes: {
|
|
112
|
+
creator: string | null | undefined;
|
|
113
|
+
id?: number | null;
|
|
114
|
+
}[];
|
|
115
|
+
address?: string | null;
|
|
116
|
+
}[];
|
|
117
|
+
voteAccounts: string[];
|
|
118
|
+
data: undefined;
|
|
119
|
+
error: null;
|
|
120
|
+
isError: false;
|
|
121
|
+
isPending: true;
|
|
122
|
+
isLoading: true;
|
|
123
|
+
isLoadingError: false;
|
|
124
|
+
isRefetchError: false;
|
|
125
|
+
isSuccess: false;
|
|
126
|
+
isPlaceholderData: false;
|
|
127
|
+
status: "pending";
|
|
128
|
+
dataUpdatedAt: number;
|
|
129
|
+
errorUpdatedAt: number;
|
|
130
|
+
failureCount: number;
|
|
131
|
+
failureReason: Error | null;
|
|
132
|
+
errorUpdateCount: number;
|
|
133
|
+
isFetched: boolean;
|
|
134
|
+
isFetchedAfterMount: boolean;
|
|
135
|
+
isFetching: boolean;
|
|
136
|
+
isInitialLoading: boolean;
|
|
137
|
+
isPaused: boolean;
|
|
138
|
+
isRefetching: boolean;
|
|
139
|
+
isStale: boolean;
|
|
140
|
+
isEnabled: boolean;
|
|
141
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
142
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
143
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery>;
|
|
144
|
+
} | {
|
|
145
|
+
iopCrowdpoolings: {
|
|
146
|
+
votes: {
|
|
147
|
+
creator: string | null | undefined;
|
|
148
|
+
id?: number | null;
|
|
149
|
+
}[];
|
|
150
|
+
address?: string | null;
|
|
151
|
+
}[];
|
|
152
|
+
voteAccounts: string[];
|
|
153
|
+
data: undefined;
|
|
154
|
+
error: null;
|
|
155
|
+
isError: false;
|
|
156
|
+
isPending: true;
|
|
157
|
+
isLoadingError: false;
|
|
158
|
+
isRefetchError: false;
|
|
159
|
+
isSuccess: false;
|
|
160
|
+
isPlaceholderData: false;
|
|
161
|
+
status: "pending";
|
|
162
|
+
dataUpdatedAt: number;
|
|
163
|
+
errorUpdatedAt: number;
|
|
164
|
+
failureCount: number;
|
|
165
|
+
failureReason: Error | null;
|
|
166
|
+
errorUpdateCount: number;
|
|
167
|
+
isFetched: boolean;
|
|
168
|
+
isFetchedAfterMount: boolean;
|
|
169
|
+
isFetching: boolean;
|
|
170
|
+
isLoading: boolean;
|
|
171
|
+
isInitialLoading: boolean;
|
|
172
|
+
isPaused: boolean;
|
|
173
|
+
isRefetching: boolean;
|
|
174
|
+
isStale: boolean;
|
|
175
|
+
isEnabled: boolean;
|
|
176
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
177
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
178
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery>;
|
|
179
|
+
} | {
|
|
180
|
+
iopCrowdpoolings: {
|
|
181
|
+
votes: {
|
|
182
|
+
creator: string | null | undefined;
|
|
183
|
+
id?: number | null;
|
|
184
|
+
}[];
|
|
185
|
+
address?: string | null;
|
|
186
|
+
}[];
|
|
187
|
+
voteAccounts: string[];
|
|
188
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery;
|
|
189
|
+
isError: false;
|
|
190
|
+
error: null;
|
|
191
|
+
isPending: false;
|
|
192
|
+
isLoading: false;
|
|
193
|
+
isLoadingError: false;
|
|
194
|
+
isRefetchError: false;
|
|
195
|
+
isSuccess: true;
|
|
196
|
+
isPlaceholderData: true;
|
|
197
|
+
status: "success";
|
|
198
|
+
dataUpdatedAt: number;
|
|
199
|
+
errorUpdatedAt: number;
|
|
200
|
+
failureCount: number;
|
|
201
|
+
failureReason: Error | null;
|
|
202
|
+
errorUpdateCount: number;
|
|
203
|
+
isFetched: boolean;
|
|
204
|
+
isFetchedAfterMount: boolean;
|
|
205
|
+
isFetching: boolean;
|
|
206
|
+
isInitialLoading: boolean;
|
|
207
|
+
isPaused: boolean;
|
|
208
|
+
isRefetching: boolean;
|
|
209
|
+
isStale: boolean;
|
|
210
|
+
isEnabled: boolean;
|
|
211
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery, Error>>;
|
|
212
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
213
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchIopcpListQuery>;
|
|
214
|
+
};
|
|
@@ -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): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum CP_STATUS {
|
|
3
|
+
WAITING = "WAITING",
|
|
4
|
+
PROGRESSING = "PROGRESSING",
|
|
5
|
+
CALMING = "CALMING",
|
|
6
|
+
ENDED = "ENDED"
|
|
7
|
+
}
|
|
8
|
+
interface MyCrowdpoolingProps {
|
|
9
|
+
onRowClick: (address: string, chainId: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export default function MyCrowdpooling({ onRowClick }: MyCrowdpoolingProps): React.JSX.Element;
|
|
12
|
+
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,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CrowdpoolingTabType } from '../types';
|
|
3
|
+
export declare enum TabType {
|
|
4
|
+
ProjectCrowdpooling = 1,
|
|
5
|
+
Favorites = 2,
|
|
6
|
+
Participating = 3,
|
|
7
|
+
History = 4
|
|
8
|
+
}
|
|
9
|
+
export default function CrowdpoolingList({ params, }: {
|
|
10
|
+
params?: {
|
|
11
|
+
tab?: CrowdpoolingTabType;
|
|
12
|
+
};
|
|
13
|
+
}): React.JSX.Element;
|
package/dist/types/widgets/CrowdpoolingWidget/CrowdpoolingPoolDetail/components/CreatorsTable.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CPDetail } from '../../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface Props {
|
|
4
|
+
detail: CPDetail;
|
|
5
|
+
}
|
|
6
|
+
declare function CreatorsTableInner({ detail }: Props): React.JSX.Element;
|
|
7
|
+
export declare const CreatorsTable: React.MemoExoticComponent<typeof CreatorsTableInner>;
|
|
8
|
+
export {};
|