@dodoex/wallet-web3-react 0.0.1-beta.0 → 0.0.1-beta.2
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/cjs/locales/en.js +1 -0
- package/dist/cjs/locales/zh.js +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.js +5 -45
- package/dist/locales/en.js +1 -0
- package/dist/locales/zh.js +1 -0
- package/dist/types/ClientProvider.d.ts +0 -1
- package/dist/types/WalletConnect/ConnectAlchemy/useConnectAlchemy.d.ts +1 -1
- package/dist/types/WalletConnectProvider.d.ts +30 -28
- package/dist/types/components/AddressWithLinkAndCopy.d.ts +0 -1
- package/dist/types/hooks/useConnectWalet.d.ts +6 -6
- package/dist/types/hooks/useFetchFiatPrice.d.ts +1 -1
- package/dist/types/hooks/useHasBalanceTokenList.d.ts +5 -5
- package/dist/types/hooks/useTransactionList.d.ts +97 -97
- package/lingui.config.ts +1 -1
- package/package.json +8 -5
- package/rollup.config.mjs +36 -0
- package/src/WalletConnect/AccountPage.tsx +1 -7
- package/src/WalletConnectProvider.tsx +1 -0
- package/src/locales/en.js +1 -0
- package/{locales → src/locales}/en.po +1 -1
- package/src/locales/zh.js +1 -0
- package/{locales → src/locales}/zh.po +1 -1
- package/tsconfig.json +3 -2
- package/locales/en.ts +0 -1
- package/locales/zh.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/module.exports={messages:JSON.parse("{\"Sz0SkD\":[\"1、Ledger Live APP is closed\",[\"BR\"],\"2、The device plugged in via USB,NOT Bluetooth\",[\"BR\"],\"3、The device is unlocked and in the \",[\"ledgerAppName\"],\" app\",[\"BR\"],\"4、”Blind Signing” is enabled in \",[\"ledgerAppName\"],\" app\"],\"AeXO77\":\"Account\",\"XJOV1Y\":\"Activity\",\"OBdohg\":\"Add Liquidity\",\"Du6bPw\":\"Address\",\"Z7ZXbT\":\"Approve\",\"vN+hAq\":\"Available Ledger Account\",\"fsBGk0\":\"Balance\",\"E/yE9x\":\"Before proceeding make sure\",\"3UCJ3e\":\"Check your email and click the link to complete login\",\"Mlg3Ds\":\"Choose existing passkey\",\"zXCpR0\":\"Claim Rewards\",\"RETKSh\":\"Connect Alchemy\",\"CtByM7\":\"Connect Wallet\",\"QHcLEN\":\"Connected\",\"9zb2WA\":\"Connecting\",\"xGVfLh\":\"Continue\",\"6V3Ea3\":\"Copied\",\"gCNLBV\":\"Copy wallet address\",\"14s9LL\":\"Create Liquidity Mining\",\"OzjK0A\":\"Create new passkey\",\"WZRsOg\":\"End mining\\\\n\",\"6KnyG0\":\"Enter email\",\"7Bj3x9\":\"Failed\",\"sr0UJD\":\"Go Back\",\"S0kLOH\":\"ID\",\"9ow2PX\":\"Installed Wallet\",\"B2Tpo0\":\"Invalid email\",\"rwC96V\":\"Invalid wallet address\",\"xHr8Pp\":\"Last connection\",\"EYDfo2\":\"Loading more\",\"Z3FXyt\":\"Loading...\",\"6Ui8nZ\":\"Log in with your email\",\"3y6FjD\":\"Log in with your email or a passkey\",\"yN5k0R\":\"More Wallets\",\"JE8mMQ\":\"No tokens\",\"zga9sT\":\"OK\",\"U8oDGg\":\"On-chain transaction records\",\"BzEFor\":\"or\",\"UbRKMZ\":\"Pending\",\"8OiU8L\":\"Pool Creation\",\"lDgVWA\":\"Receive\",\"pkRuyd\":\"Receiver address\",\"3XBvkd\":\"Remove Liquidity\",\"OfhWJH\":\"Reset\",\"JlFcis\":\"Send\",\"JYKRJS\":\"Stake\",\"hQRttt\":\"Submit\",\"KAbcm2\":\"Succeeded\",\"vH2C/2\":\"Swap\",\"kdetxi\":\"The Ledger Device is locked\\nPlease unlock from the device\",\"FzJ11V\":\"This is empty\",\"TP9/K5\":\"Token\",\"zPGNJm\":\"Transfer\",\"LobdAW\":\"Unknown Error\"}")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/module.exports={messages:JSON.parse("{\"Sz0SkD\":[\"1、Ledger Live APP is closed\",[\"BR\"],\"2、The device plugged in via USB,NOT Bluetooth\",[\"BR\"],\"3、The device is unlocked and in the \",[\"ledgerAppName\"],\" app\",[\"BR\"],\"4、”Blind Signing” is enabled in \",[\"ledgerAppName\"],\" app\"],\"AeXO77\":\"Account\",\"XJOV1Y\":\"Activity\",\"OBdohg\":\"Add Liquidity\",\"Du6bPw\":\"Address\",\"Z7ZXbT\":\"Approve\",\"vN+hAq\":\"Available Ledger Account\",\"fsBGk0\":\"Balance\",\"E/yE9x\":\"Before proceeding make sure\",\"3UCJ3e\":\"Check your email and click the link to complete login\",\"Mlg3Ds\":\"Choose existing passkey\",\"zXCpR0\":\"Claim Rewards\",\"RETKSh\":\"Connect Alchemy\",\"CtByM7\":\"Connect Wallet\",\"QHcLEN\":\"Connected\",\"9zb2WA\":\"Connecting\",\"xGVfLh\":\"Continue\",\"6V3Ea3\":\"Copied\",\"gCNLBV\":\"Copy wallet address\",\"14s9LL\":\"Create Liquidity Mining\",\"OzjK0A\":\"Create new passkey\",\"WZRsOg\":\"End mining\\\\n\",\"6KnyG0\":\"Enter email\",\"7Bj3x9\":\"Failed\",\"sr0UJD\":\"Go Back\",\"S0kLOH\":\"ID\",\"9ow2PX\":\"Installed Wallet\",\"B2Tpo0\":\"Invalid email\",\"rwC96V\":\"Invalid wallet address\",\"xHr8Pp\":\"Last connection\",\"EYDfo2\":\"Loading more\",\"Z3FXyt\":\"Loading...\",\"6Ui8nZ\":\"Log in with your email\",\"3y6FjD\":\"Log in with your email or a passkey\",\"yN5k0R\":\"More Wallets\",\"JE8mMQ\":\"No tokens\",\"zga9sT\":\"OK\",\"U8oDGg\":\"On-chain transaction records\",\"BzEFor\":\"or\",\"UbRKMZ\":\"Pending\",\"8OiU8L\":\"Pool Creation\",\"lDgVWA\":\"Receive\",\"pkRuyd\":\"Receiver address\",\"3XBvkd\":\"Remove Liquidity\",\"OfhWJH\":\"Reset\",\"JlFcis\":\"Send\",\"JYKRJS\":\"Stake\",\"hQRttt\":\"Submit\",\"KAbcm2\":\"Succeeded\",\"vH2C/2\":\"Swap\",\"kdetxi\":\"The Ledger Device is locked\\nPlease unlock from the device\",\"FzJ11V\":\"This is empty\",\"TP9/K5\":\"Token\",\"zPGNJm\":\"Transfer\",\"LobdAW\":\"Unknown Error\"}")};
|
|
@@ -9,4 +9,4 @@ export declare function useConnectAlchemyQuery({ walletWeb3, showAlchemyConnect,
|
|
|
9
9
|
}): void;
|
|
10
10
|
export declare function useConnectAlchemy({ walletWeb3 }: {
|
|
11
11
|
walletWeb3: WalletWeb3;
|
|
12
|
-
}): import("@tanstack/react-query
|
|
12
|
+
}): import("@tanstack/react-query").UseMutationResult<void, Error, import("@alchemy/aa-alchemy").AuthParams | undefined, unknown>;
|
|
@@ -3,19 +3,19 @@ import React from 'react';
|
|
|
3
3
|
import { TokenInfo } from './components/TokenLogo';
|
|
4
4
|
import { WalletItem } from './hooks/useConnectWalet';
|
|
5
5
|
export declare const WalletConnectProvider: React.Provider<{
|
|
6
|
-
chainId?: number
|
|
6
|
+
chainId?: number;
|
|
7
7
|
termsOfServiceLink?: React.ReactNode;
|
|
8
|
-
connectTimeout?: number
|
|
9
|
-
graphQLRequests?: GraphQLRequests
|
|
8
|
+
connectTimeout?: number;
|
|
9
|
+
graphQLRequests?: GraphQLRequests;
|
|
10
10
|
tokenList: Array<TokenInfo>;
|
|
11
|
-
restApiRequests?: RestApiRequests
|
|
12
|
-
SendTokenPage?: (
|
|
11
|
+
restApiRequests?: RestApiRequests;
|
|
12
|
+
SendTokenPage?: (params: {
|
|
13
13
|
open?: boolean;
|
|
14
14
|
onClose: () => void;
|
|
15
15
|
onBack: () => void;
|
|
16
|
-
}) => JSX.Element
|
|
17
|
-
encryptFiatPriceToken?: (
|
|
18
|
-
loadAccountListEthBalance?: (
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
encryptFiatPriceToken?: () => string;
|
|
18
|
+
loadAccountListEthBalance?: (accountList: string[], chainId?: number) => Promise<Map<string, number | null>>;
|
|
19
19
|
getChain: (chainId: number) => null | {
|
|
20
20
|
name: string;
|
|
21
21
|
scanUrl: string;
|
|
@@ -24,32 +24,33 @@ export declare const WalletConnectProvider: React.Provider<{
|
|
|
24
24
|
decimals: number;
|
|
25
25
|
};
|
|
26
26
|
logo: React.ReactNode;
|
|
27
|
+
logoBg?: React.ReactNode;
|
|
27
28
|
};
|
|
28
|
-
getTokenLogoUrl?: (
|
|
29
|
+
getTokenLogoUrl?: (op: {
|
|
29
30
|
chainId?: number | null;
|
|
30
31
|
address?: string | null;
|
|
31
32
|
width?: number;
|
|
32
33
|
height?: number;
|
|
33
|
-
}) => string | null
|
|
34
|
-
onConnectTimeout?: (
|
|
35
|
-
switchNetwork?: (
|
|
36
|
-
onConnected?: (
|
|
37
|
-
onClickToken?: (
|
|
34
|
+
}) => string | null;
|
|
35
|
+
onConnectTimeout?: () => void;
|
|
36
|
+
switchNetwork?: (chainId: number) => void;
|
|
37
|
+
onConnected?: (chainId: number, wallet: WalletItem) => void;
|
|
38
|
+
onClickToken?: (token: TokenInfo) => void;
|
|
38
39
|
}>;
|
|
39
40
|
export declare const useWalletConnectContext: () => {
|
|
40
|
-
chainId?: number
|
|
41
|
+
chainId?: number;
|
|
41
42
|
termsOfServiceLink?: React.ReactNode;
|
|
42
|
-
connectTimeout?: number
|
|
43
|
-
graphQLRequests?: GraphQLRequests
|
|
43
|
+
connectTimeout?: number;
|
|
44
|
+
graphQLRequests?: GraphQLRequests;
|
|
44
45
|
tokenList: Array<TokenInfo>;
|
|
45
|
-
restApiRequests?: RestApiRequests
|
|
46
|
-
SendTokenPage?: (
|
|
46
|
+
restApiRequests?: RestApiRequests;
|
|
47
|
+
SendTokenPage?: (params: {
|
|
47
48
|
open?: boolean;
|
|
48
49
|
onClose: () => void;
|
|
49
50
|
onBack: () => void;
|
|
50
|
-
}) => JSX.Element
|
|
51
|
-
encryptFiatPriceToken?: (
|
|
52
|
-
loadAccountListEthBalance?: (
|
|
51
|
+
}) => JSX.Element;
|
|
52
|
+
encryptFiatPriceToken?: () => string;
|
|
53
|
+
loadAccountListEthBalance?: (accountList: string[], chainId?: number) => Promise<Map<string, number | null>>;
|
|
53
54
|
getChain: (chainId: number) => null | {
|
|
54
55
|
name: string;
|
|
55
56
|
scanUrl: string;
|
|
@@ -58,15 +59,16 @@ export declare const useWalletConnectContext: () => {
|
|
|
58
59
|
decimals: number;
|
|
59
60
|
};
|
|
60
61
|
logo: React.ReactNode;
|
|
62
|
+
logoBg?: React.ReactNode;
|
|
61
63
|
};
|
|
62
|
-
getTokenLogoUrl?: (
|
|
64
|
+
getTokenLogoUrl?: (op: {
|
|
63
65
|
chainId?: number | null;
|
|
64
66
|
address?: string | null;
|
|
65
67
|
width?: number;
|
|
66
68
|
height?: number;
|
|
67
|
-
}) => string | null
|
|
68
|
-
onConnectTimeout?: (
|
|
69
|
-
switchNetwork?: (
|
|
70
|
-
onConnected?: (
|
|
71
|
-
onClickToken?: (
|
|
69
|
+
}) => string | null;
|
|
70
|
+
onConnectTimeout?: () => void;
|
|
71
|
+
switchNetwork?: (chainId: number) => void;
|
|
72
|
+
onConnected?: (chainId: number, wallet: WalletItem) => void;
|
|
73
|
+
onClickToken?: (token: TokenInfo) => void;
|
|
72
74
|
};
|
|
@@ -9,22 +9,22 @@ export interface WalletItem {
|
|
|
9
9
|
isInstalled?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare const useConnectWallet: ({ walletWeb3, matchTestChain, showOtherInjectWallet, selectedChainId, hasTermsOfServiceLink, }: {
|
|
12
|
-
walletWeb3?: WalletWeb3
|
|
12
|
+
walletWeb3?: WalletWeb3;
|
|
13
13
|
/** Match the test chain and display the first bit of showName and chainIds as the matching test chain. If it is false or not transmitted, the main network information will still be displayed. */
|
|
14
|
-
matchTestChain?: boolean
|
|
14
|
+
matchTestChain?: boolean;
|
|
15
15
|
/**
|
|
16
16
|
* No need to display when switching wallets
|
|
17
17
|
*/
|
|
18
|
-
showOtherInjectWallet?: boolean
|
|
19
|
-
selectedChainId?: number
|
|
20
|
-
hasTermsOfServiceLink?: boolean
|
|
18
|
+
showOtherInjectWallet?: boolean;
|
|
19
|
+
selectedChainId?: number;
|
|
20
|
+
hasTermsOfServiceLink?: boolean;
|
|
21
21
|
}) => {
|
|
22
22
|
walletList: WalletItem[];
|
|
23
23
|
userReadAndChecked: boolean;
|
|
24
24
|
handleChangeUserReadAndChecked: (val: boolean) => void;
|
|
25
25
|
activeWalletType: import("@dodoex/wallet-web3").WalletType | undefined;
|
|
26
26
|
};
|
|
27
|
-
export declare const connectToWallet: (walletWeb3: WalletWeb3 | undefined, wallet: Wallet, config?: Partial<WalletWeb3[
|
|
27
|
+
export declare const connectToWallet: (walletWeb3: WalletWeb3 | undefined, wallet: Wallet, config?: Partial<WalletWeb3["providerConfig"]>) => Promise<import("@ethersproject/providers").JsonRpcProvider | undefined>;
|
|
28
28
|
export declare function useWalletListByNetwork(chainId?: number, walletWeb3?: WalletWeb3, showOtherInjectWallet?: boolean, closeSingleWalletConnectModal?: () => void): {
|
|
29
29
|
walletList: WalletItem[];
|
|
30
30
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TokenInfo } from '../components/TokenLogo';
|
|
2
2
|
export declare function getFiatPriceQueryKeys(tokens?: TokenInfo[]): (string | TokenInfo[] | undefined)[];
|
|
3
|
-
export declare function useFetchFiatPrice(tokens: TokenInfo[]): import("@tanstack/react-query
|
|
3
|
+
export declare function useFetchFiatPrice(tokens: TokenInfo[]): import("@tanstack/react-query").UseQueryResult<Map<string, number>, Error>;
|
|
@@ -10,12 +10,12 @@ export declare function useHasBalanceTokenList({ account, chainId, visible, }: {
|
|
|
10
10
|
balance: BigNumber;
|
|
11
11
|
chainId: number;
|
|
12
12
|
address: string;
|
|
13
|
-
symbol?: string
|
|
14
|
-
name?: string
|
|
15
|
-
decimals?: number
|
|
16
|
-
logoURI?: string
|
|
13
|
+
symbol?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
decimals?: number;
|
|
16
|
+
logoURI?: string;
|
|
17
17
|
}[];
|
|
18
|
-
fiatPriceQuery: import("@tanstack/react-query
|
|
18
|
+
fiatPriceQuery: import("@tanstack/react-query").UseQueryResult<Map<string, number>, Error>;
|
|
19
19
|
allFiatPriceBalance: BigNumber;
|
|
20
20
|
allFiatPriceBalanceLoading: boolean;
|
|
21
21
|
};
|
|
@@ -11,24 +11,24 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
11
11
|
chainId?: number;
|
|
12
12
|
}): {
|
|
13
13
|
list: ({
|
|
14
|
-
chainId?: number | null
|
|
15
|
-
createTime?: string | null
|
|
16
|
-
extend?: any;
|
|
17
|
-
from?: string | null
|
|
18
|
-
id?: number | null
|
|
19
|
-
key?: string | null
|
|
20
|
-
type?: string | null
|
|
14
|
+
chainId?: number | null;
|
|
15
|
+
createTime?: string | null;
|
|
16
|
+
extend?: any | null;
|
|
17
|
+
from?: string | null;
|
|
18
|
+
id?: number | null;
|
|
19
|
+
key?: string | null;
|
|
20
|
+
type?: string | null;
|
|
21
21
|
} | null)[];
|
|
22
22
|
pendingList: ({
|
|
23
|
-
chainId?: number | null
|
|
24
|
-
createTime?: string | null
|
|
25
|
-
extend?: any;
|
|
26
|
-
from?: string | null
|
|
27
|
-
id?: number | null
|
|
28
|
-
key?: string | null
|
|
29
|
-
type?: string | null
|
|
23
|
+
chainId?: number | null;
|
|
24
|
+
createTime?: string | null;
|
|
25
|
+
extend?: any | null;
|
|
26
|
+
from?: string | null;
|
|
27
|
+
id?: number | null;
|
|
28
|
+
key?: string | null;
|
|
29
|
+
type?: string | null;
|
|
30
30
|
} | null)[];
|
|
31
|
-
data: import("@tanstack/query
|
|
31
|
+
data: import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>;
|
|
32
32
|
error: Error;
|
|
33
33
|
isError: true;
|
|
34
34
|
isPending: false;
|
|
@@ -37,8 +37,8 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
37
37
|
isRefetchError: true;
|
|
38
38
|
isSuccess: false;
|
|
39
39
|
status: "error";
|
|
40
|
-
fetchNextPage: (options?: import("@tanstack/query
|
|
41
|
-
fetchPreviousPage: (options?: import("@tanstack/query
|
|
40
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
41
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
42
42
|
hasNextPage: boolean;
|
|
43
43
|
hasPreviousPage: boolean;
|
|
44
44
|
isFetchNextPageError: boolean;
|
|
@@ -58,29 +58,29 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
58
58
|
isPlaceholderData: boolean;
|
|
59
59
|
isRefetching: boolean;
|
|
60
60
|
isStale: boolean;
|
|
61
|
-
refetch: (options?: import("@tanstack/query
|
|
62
|
-
fetchStatus: import("@tanstack/query
|
|
63
|
-
promise: Promise<import("@tanstack/query
|
|
61
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
62
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
63
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
|
|
64
64
|
} | {
|
|
65
65
|
list: ({
|
|
66
|
-
chainId?: number | null
|
|
67
|
-
createTime?: string | null
|
|
68
|
-
extend?: any;
|
|
69
|
-
from?: string | null
|
|
70
|
-
id?: number | null
|
|
71
|
-
key?: string | null
|
|
72
|
-
type?: string | null
|
|
66
|
+
chainId?: number | null;
|
|
67
|
+
createTime?: string | null;
|
|
68
|
+
extend?: any | null;
|
|
69
|
+
from?: string | null;
|
|
70
|
+
id?: number | null;
|
|
71
|
+
key?: string | null;
|
|
72
|
+
type?: string | null;
|
|
73
73
|
} | null)[];
|
|
74
74
|
pendingList: ({
|
|
75
|
-
chainId?: number | null
|
|
76
|
-
createTime?: string | null
|
|
77
|
-
extend?: any;
|
|
78
|
-
from?: string | null
|
|
79
|
-
id?: number | null
|
|
80
|
-
key?: string | null
|
|
81
|
-
type?: string | null
|
|
75
|
+
chainId?: number | null;
|
|
76
|
+
createTime?: string | null;
|
|
77
|
+
extend?: any | null;
|
|
78
|
+
from?: string | null;
|
|
79
|
+
id?: number | null;
|
|
80
|
+
key?: string | null;
|
|
81
|
+
type?: string | null;
|
|
82
82
|
} | null)[];
|
|
83
|
-
data: import("@tanstack/query
|
|
83
|
+
data: import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>;
|
|
84
84
|
error: null;
|
|
85
85
|
isError: false;
|
|
86
86
|
isPending: false;
|
|
@@ -91,8 +91,8 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
91
91
|
isFetchPreviousPageError: false;
|
|
92
92
|
isSuccess: true;
|
|
93
93
|
status: "success";
|
|
94
|
-
fetchNextPage: (options?: import("@tanstack/query
|
|
95
|
-
fetchPreviousPage: (options?: import("@tanstack/query
|
|
94
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
95
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
96
96
|
hasNextPage: boolean;
|
|
97
97
|
hasPreviousPage: boolean;
|
|
98
98
|
isFetchingNextPage: boolean;
|
|
@@ -110,27 +110,27 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
110
110
|
isPlaceholderData: boolean;
|
|
111
111
|
isRefetching: boolean;
|
|
112
112
|
isStale: boolean;
|
|
113
|
-
refetch: (options?: import("@tanstack/query
|
|
114
|
-
fetchStatus: import("@tanstack/query
|
|
115
|
-
promise: Promise<import("@tanstack/query
|
|
113
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
114
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
115
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
|
|
116
116
|
} | {
|
|
117
117
|
list: ({
|
|
118
|
-
chainId?: number | null
|
|
119
|
-
createTime?: string | null
|
|
120
|
-
extend?: any;
|
|
121
|
-
from?: string | null
|
|
122
|
-
id?: number | null
|
|
123
|
-
key?: string | null
|
|
124
|
-
type?: string | null
|
|
118
|
+
chainId?: number | null;
|
|
119
|
+
createTime?: string | null;
|
|
120
|
+
extend?: any | null;
|
|
121
|
+
from?: string | null;
|
|
122
|
+
id?: number | null;
|
|
123
|
+
key?: string | null;
|
|
124
|
+
type?: string | null;
|
|
125
125
|
} | null)[];
|
|
126
126
|
pendingList: ({
|
|
127
|
-
chainId?: number | null
|
|
128
|
-
createTime?: string | null
|
|
129
|
-
extend?: any;
|
|
130
|
-
from?: string | null
|
|
131
|
-
id?: number | null
|
|
132
|
-
key?: string | null
|
|
133
|
-
type?: string | null
|
|
127
|
+
chainId?: number | null;
|
|
128
|
+
createTime?: string | null;
|
|
129
|
+
extend?: any | null;
|
|
130
|
+
from?: string | null;
|
|
131
|
+
id?: number | null;
|
|
132
|
+
key?: string | null;
|
|
133
|
+
type?: string | null;
|
|
134
134
|
} | null)[];
|
|
135
135
|
data: undefined;
|
|
136
136
|
error: Error;
|
|
@@ -143,8 +143,8 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
143
143
|
isFetchPreviousPageError: false;
|
|
144
144
|
isSuccess: false;
|
|
145
145
|
status: "error";
|
|
146
|
-
fetchNextPage: (options?: import("@tanstack/query
|
|
147
|
-
fetchPreviousPage: (options?: import("@tanstack/query
|
|
146
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
147
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
148
148
|
hasNextPage: boolean;
|
|
149
149
|
hasPreviousPage: boolean;
|
|
150
150
|
isFetchingNextPage: boolean;
|
|
@@ -162,27 +162,27 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
162
162
|
isPlaceholderData: boolean;
|
|
163
163
|
isRefetching: boolean;
|
|
164
164
|
isStale: boolean;
|
|
165
|
-
refetch: (options?: import("@tanstack/query
|
|
166
|
-
fetchStatus: import("@tanstack/query
|
|
167
|
-
promise: Promise<import("@tanstack/query
|
|
165
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
166
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
167
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
|
|
168
168
|
} | {
|
|
169
169
|
list: ({
|
|
170
|
-
chainId?: number | null
|
|
171
|
-
createTime?: string | null
|
|
172
|
-
extend?: any;
|
|
173
|
-
from?: string | null
|
|
174
|
-
id?: number | null
|
|
175
|
-
key?: string | null
|
|
176
|
-
type?: string | null
|
|
170
|
+
chainId?: number | null;
|
|
171
|
+
createTime?: string | null;
|
|
172
|
+
extend?: any | null;
|
|
173
|
+
from?: string | null;
|
|
174
|
+
id?: number | null;
|
|
175
|
+
key?: string | null;
|
|
176
|
+
type?: string | null;
|
|
177
177
|
} | null)[];
|
|
178
178
|
pendingList: ({
|
|
179
|
-
chainId?: number | null
|
|
180
|
-
createTime?: string | null
|
|
181
|
-
extend?: any;
|
|
182
|
-
from?: string | null
|
|
183
|
-
id?: number | null
|
|
184
|
-
key?: string | null
|
|
185
|
-
type?: string | null
|
|
179
|
+
chainId?: number | null;
|
|
180
|
+
createTime?: string | null;
|
|
181
|
+
extend?: any | null;
|
|
182
|
+
from?: string | null;
|
|
183
|
+
id?: number | null;
|
|
184
|
+
key?: string | null;
|
|
185
|
+
type?: string | null;
|
|
186
186
|
} | null)[];
|
|
187
187
|
data: undefined;
|
|
188
188
|
error: null;
|
|
@@ -195,8 +195,8 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
195
195
|
isFetchPreviousPageError: false;
|
|
196
196
|
isSuccess: false;
|
|
197
197
|
status: "pending";
|
|
198
|
-
fetchNextPage: (options?: import("@tanstack/query
|
|
199
|
-
fetchPreviousPage: (options?: import("@tanstack/query
|
|
198
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
199
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
200
200
|
hasNextPage: boolean;
|
|
201
201
|
hasPreviousPage: boolean;
|
|
202
202
|
isFetchingNextPage: boolean;
|
|
@@ -214,27 +214,27 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
214
214
|
isPlaceholderData: boolean;
|
|
215
215
|
isRefetching: boolean;
|
|
216
216
|
isStale: boolean;
|
|
217
|
-
refetch: (options?: import("@tanstack/query
|
|
218
|
-
fetchStatus: import("@tanstack/query
|
|
219
|
-
promise: Promise<import("@tanstack/query
|
|
217
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
218
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
219
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
|
|
220
220
|
} | {
|
|
221
221
|
list: ({
|
|
222
|
-
chainId?: number | null
|
|
223
|
-
createTime?: string | null
|
|
224
|
-
extend?: any;
|
|
225
|
-
from?: string | null
|
|
226
|
-
id?: number | null
|
|
227
|
-
key?: string | null
|
|
228
|
-
type?: string | null
|
|
222
|
+
chainId?: number | null;
|
|
223
|
+
createTime?: string | null;
|
|
224
|
+
extend?: any | null;
|
|
225
|
+
from?: string | null;
|
|
226
|
+
id?: number | null;
|
|
227
|
+
key?: string | null;
|
|
228
|
+
type?: string | null;
|
|
229
229
|
} | null)[];
|
|
230
230
|
pendingList: ({
|
|
231
|
-
chainId?: number | null
|
|
232
|
-
createTime?: string | null
|
|
233
|
-
extend?: any;
|
|
234
|
-
from?: string | null
|
|
235
|
-
id?: number | null
|
|
236
|
-
key?: string | null
|
|
237
|
-
type?: string | null
|
|
231
|
+
chainId?: number | null;
|
|
232
|
+
createTime?: string | null;
|
|
233
|
+
extend?: any | null;
|
|
234
|
+
from?: string | null;
|
|
235
|
+
id?: number | null;
|
|
236
|
+
key?: string | null;
|
|
237
|
+
type?: string | null;
|
|
238
238
|
} | null)[];
|
|
239
239
|
data: undefined;
|
|
240
240
|
error: null;
|
|
@@ -246,8 +246,8 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
246
246
|
isFetchPreviousPageError: false;
|
|
247
247
|
isSuccess: false;
|
|
248
248
|
status: "pending";
|
|
249
|
-
fetchNextPage: (options?: import("@tanstack/query
|
|
250
|
-
fetchPreviousPage: (options?: import("@tanstack/query
|
|
249
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
250
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
251
251
|
hasNextPage: boolean;
|
|
252
252
|
hasPreviousPage: boolean;
|
|
253
253
|
isFetchingNextPage: boolean;
|
|
@@ -266,7 +266,7 @@ export declare function useTransactionList({ account, chainId, }: {
|
|
|
266
266
|
isPlaceholderData: boolean;
|
|
267
267
|
isRefetching: boolean;
|
|
268
268
|
isStale: boolean;
|
|
269
|
-
refetch: (options?: import("@tanstack/query
|
|
270
|
-
fetchStatus: import("@tanstack/query
|
|
271
|
-
promise: Promise<import("@tanstack/query
|
|
269
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
|
|
270
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
271
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
|
|
272
272
|
};
|
package/lingui.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/wallet-web3-react",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.2",
|
|
4
4
|
"source": "src/index.tsx",
|
|
5
5
|
"types": "dist/types/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"start": "yarn workspace doc start",
|
|
10
|
-
"build": "
|
|
10
|
+
"build": "yarn extract && yarn compile && rollup -c",
|
|
11
11
|
"extract": "lingui extract --clean",
|
|
12
|
-
"compile": "lingui compile
|
|
12
|
+
"compile": "lingui compile"
|
|
13
13
|
},
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "GPL-3.0-or-later",
|
|
@@ -32,12 +32,15 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@dodoex/wallet-web3": "0.0.61-beta.0"
|
|
35
|
+
"@dodoex/wallet-web3": "0.0.61-beta.0",
|
|
36
|
+
"react": ">=17.0.2",
|
|
37
|
+
"react-dom": ">=17.0.2"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
40
|
"@lingui/cli": "^4.11.4",
|
|
39
41
|
"@lingui/loader": "^4.11.4",
|
|
40
42
|
"@lingui/swc-plugin": "4.0.6",
|
|
43
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
41
44
|
"@rollup/plugin-terser": "^0.4.4",
|
|
42
45
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
43
46
|
"@rollup/plugin-url": "^8.0.2",
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
"rollup": "^4.28.0",
|
|
48
51
|
"rollup-plugin-clear": "^2.0.7",
|
|
49
52
|
"rollup-plugin-import-css": "^3.5.7",
|
|
50
|
-
"typescript": "^
|
|
53
|
+
"typescript": "^5.6.3"
|
|
51
54
|
},
|
|
52
55
|
"dependencies": {
|
|
53
56
|
"@dodoex/api": "^3.0.2",
|
package/rollup.config.mjs
CHANGED
|
@@ -4,16 +4,28 @@ import json from '@rollup/plugin-json';
|
|
|
4
4
|
import typescript from '@rollup/plugin-typescript';
|
|
5
5
|
import terser from '@rollup/plugin-terser';
|
|
6
6
|
import url from '@rollup/plugin-url';
|
|
7
|
+
import replace from '@rollup/plugin-replace';
|
|
7
8
|
import resolve from '@rollup/plugin-node-resolve';
|
|
8
9
|
import svgr from '@svgr/rollup';
|
|
9
10
|
import pkg from './package.json' with { type: 'json' };
|
|
11
|
+
import globby from 'globby';
|
|
10
12
|
import css from 'rollup-plugin-import-css';
|
|
11
13
|
import clear from 'rollup-plugin-clear';
|
|
12
14
|
|
|
13
15
|
const extensions = ['.js', '.jsx', '.ts', '.tsx'];
|
|
14
16
|
const baseConfig = {
|
|
15
17
|
input: pkg.source,
|
|
18
|
+
jsx: {
|
|
19
|
+
mode: 'preserve',
|
|
20
|
+
factory: 'React.createElement',
|
|
21
|
+
fragment: 'React.Fragment',
|
|
22
|
+
importSource: 'react'
|
|
23
|
+
},
|
|
16
24
|
plugins: [
|
|
25
|
+
replace({
|
|
26
|
+
'../locales/${locale}.js': './locales/${locale}.js',
|
|
27
|
+
delimiters: ['', ''],
|
|
28
|
+
}),
|
|
17
29
|
url(),
|
|
18
30
|
svgr({
|
|
19
31
|
svgo: true,
|
|
@@ -50,6 +62,21 @@ const baseConfig = {
|
|
|
50
62
|
],
|
|
51
63
|
};
|
|
52
64
|
|
|
65
|
+
const localesConfig = globby.sync('src/locales/*.js').map((inputFile) => ({
|
|
66
|
+
input: inputFile,
|
|
67
|
+
output: [
|
|
68
|
+
{
|
|
69
|
+
dir: 'dist/locales',
|
|
70
|
+
format: 'esm',
|
|
71
|
+
sourcemap: false,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
dir: 'dist/cjs/locales',
|
|
75
|
+
sourcemap: false,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
}));
|
|
79
|
+
|
|
53
80
|
export default [
|
|
54
81
|
{
|
|
55
82
|
output: [
|
|
@@ -58,7 +85,16 @@ export default [
|
|
|
58
85
|
format: 'es',
|
|
59
86
|
plugins: [terser()],
|
|
60
87
|
},
|
|
88
|
+
{
|
|
89
|
+
dir: 'dist',
|
|
90
|
+
entryFileNames: '[name].cjs',
|
|
91
|
+
chunkFileNames: '[name]-[hash].cjs',
|
|
92
|
+
format: 'cjs',
|
|
93
|
+
sourcemap: false,
|
|
94
|
+
plugins: [terser()],
|
|
95
|
+
},
|
|
61
96
|
],
|
|
62
97
|
...baseConfig,
|
|
63
98
|
},
|
|
99
|
+
...localesConfig,
|
|
64
100
|
];
|