@dodoex/widgets 3.0.0-beta.0 → 3.0.0-beta.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/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +1 -1
- package/dist/cjs/src/components/Swap/components/ConnectWallet/index.d.ts +1 -1
- package/dist/cjs/src/components/SwitchChainDialog/index.d.ts +1 -1
- package/dist/cjs/src/components/TokenPicker/index.d.ts +1 -1
- package/dist/cjs/src/components/Widget/index.d.ts +1 -1
- package/dist/cjs/src/constants/api.d.ts +1 -2
- package/dist/cjs/src/constants/chainList.d.ts +1 -1
- package/dist/cjs/src/constants/chains.d.ts +1 -1
- package/dist/cjs/src/constants/localstorage.d.ts +1 -1
- package/dist/cjs/src/hooks/ConnectWallet/useCurrentChainId.d.ts +1 -1
- package/dist/cjs/src/hooks/ConnectWallet/useSwitchChain.d.ts +1 -1
- package/dist/cjs/src/hooks/ConnectWallet/useWeb3Connectors.d.ts +1 -1
- package/dist/cjs/src/hooks/ConnectWallet/web3.d.ts +1 -1
- package/dist/cjs/src/hooks/Submission/getExecutionErrorMsg.d.ts +1 -1
- package/dist/cjs/src/hooks/Token/useTokenList.d.ts +1 -1
- package/dist/cjs/src/router/types.d.ts +1 -1
- package/dist/cjs/src/store/actions/wallet.d.ts +1 -1
- package/dist/cjs/src/store/reducers/wallet.d.ts +1 -1
- package/dist/cjs/src/store/selectors/token.d.ts +1 -1
- package/dist/cjs/src/utils/address.d.ts +1 -1
- package/dist/cjs/src/utils/chains.d.ts +1 -1
- package/dist/cjs/src/utils/token.d.ts +1 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +1 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolList/MyCreated.d.ts +1 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +1 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +1 -1
- package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +1 -1
- package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +1 -1
- package/dist/src/components/Swap/components/ConnectWallet/index.d.ts +1 -1
- package/dist/src/components/SwitchChainDialog/index.d.ts +1 -1
- package/dist/src/components/TokenPicker/index.d.ts +1 -1
- package/dist/src/components/Widget/index.d.ts +1 -1
- package/dist/src/constants/api.d.ts +1 -2
- package/dist/src/constants/chainList.d.ts +1 -1
- package/dist/src/constants/chains.d.ts +1 -1
- package/dist/src/constants/localstorage.d.ts +1 -1
- package/dist/src/hooks/ConnectWallet/useCurrentChainId.d.ts +1 -1
- package/dist/src/hooks/ConnectWallet/useSwitchChain.d.ts +1 -1
- package/dist/src/hooks/ConnectWallet/useWeb3Connectors.d.ts +1 -1
- package/dist/src/hooks/ConnectWallet/web3.d.ts +1 -1
- package/dist/src/hooks/Submission/getExecutionErrorMsg.d.ts +1 -1
- package/dist/src/hooks/Token/useTokenList.d.ts +1 -1
- package/dist/src/router/types.d.ts +1 -1
- package/dist/src/store/actions/wallet.d.ts +1 -1
- package/dist/src/store/reducers/wallet.d.ts +1 -1
- package/dist/src/store/selectors/token.d.ts +1 -1
- package/dist/src/utils/address.d.ts +1 -1
- package/dist/src/utils/chains.d.ts +1 -1
- package/dist/src/utils/token.d.ts +1 -1
- package/dist/src/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +1 -1
- package/dist/src/widgets/PoolWidget/PoolList/MyCreated.d.ts +1 -1
- package/dist/src/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +1 -1
- package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +1 -1
- package/dist/src/widgets/PoolWidget/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '@dodoex/components';
|
|
3
|
-
import { ChainId } from '
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
4
|
export default function NeedConnectButton({ chainId, includeButton, ...props }: ButtonProps & {
|
|
5
5
|
/** chainId that needs to be connected */
|
|
6
6
|
chainId?: ChainId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { TokenInfo } from '../../hooks/Token';
|
|
3
|
-
import { ChainId } from '
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
4
|
export interface TokenPickerProps {
|
|
5
5
|
chainId?: ChainId;
|
|
6
6
|
value?: TokenInfo | null | Array<TokenInfo>;
|
|
@@ -4,7 +4,7 @@ import { SupportedLang } from '../../constants/locales';
|
|
|
4
4
|
import { Web3ConnectorsProps } from '../../hooks/ConnectWallet';
|
|
5
5
|
import { InitTokenListProps } from '../../hooks/Token/useInitTokenList';
|
|
6
6
|
import { ExecutionProps } from '../../hooks/Submission';
|
|
7
|
-
import { ChainId } from '
|
|
7
|
+
import { ChainId } from '@dodoex/api';
|
|
8
8
|
import { DefaultTokenInfo } from '../../hooks/Token/type';
|
|
9
9
|
import { APIServices } from '../../constants/api';
|
|
10
10
|
import { SwapProps } from '../Swap';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ContractRequests, GraphQLRequests, TokenApi } from '@dodoex/api';
|
|
2
|
-
import { ChainId } from './chains';
|
|
1
|
+
import { ContractRequests, GraphQLRequests, TokenApi, ChainId } from '@dodoex/api';
|
|
3
2
|
export declare enum APIServiceKey {
|
|
4
3
|
routePrice = "routePrice",
|
|
5
4
|
fiatPrice = "fiatPrice",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenInfo } from '../hooks/Token';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
export declare function getAuthSwitchCache(): boolean;
|
|
4
4
|
export declare function setAuthSwitchCache(isAuto: boolean): void;
|
|
5
5
|
export interface LastTokenCache {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export declare function useCurrentChainId(): ChainId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Provider as Eip1193Provider } from '@web3-react/types';
|
|
2
2
|
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
|
-
import { ChainId } from '
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
4
|
import { Web3Connection } from './web3';
|
|
5
5
|
import { WalletType } from '../../constants/wallet';
|
|
6
6
|
export interface Web3ConnectorsProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Web3ReactHooks } from '@web3-react/core';
|
|
2
2
|
import { Connector, Provider as Eip1193Provider } from '@web3-react/types';
|
|
3
3
|
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
4
|
-
import
|
|
4
|
+
import { ChainId } from '@dodoex/api';
|
|
5
5
|
export declare type Web3Connection = [Connector, Web3ReactHooks];
|
|
6
6
|
export declare function getConnectionFromProvider(onError: (error: Error) => void, provider?: JsonRpcProvider | Eip1193Provider): Web3Connection | undefined;
|
|
7
7
|
export declare function getConnectionFromWalletConnect(useDefault: boolean, jsonRpcUrlMap: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export default function getExecutionErrorMsg(chainId: ChainId, message: string): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { TokenInfo, TokenList } from './type';
|
|
4
|
-
import { ChainId } from '
|
|
4
|
+
import { ChainId } from '@dodoex/api';
|
|
5
5
|
export declare const getFuzzySearchTokenSort: (token: TokenInfo, search: string, { matchAddress, }?: {
|
|
6
6
|
matchAddress?: boolean | undefined;
|
|
7
7
|
}) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppThunkAction } from '.';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { State } from '../reducers/wallet';
|
|
4
4
|
export declare const setDefaultChainId: (chainId: ChainId) => AppThunkAction;
|
|
5
5
|
export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import type { DefaultTokenInfo } from '../../hooks/Token';
|
|
3
3
|
import { RootState } from '../reducers';
|
|
4
4
|
export declare const getTokenList: (state?: RootState) => import("../../hooks/Token").TokenList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export declare const isSameAddress: (tokenAddress1: string, tokenAddress2: string) => boolean;
|
|
3
3
|
export declare function isAddress(value: any): boolean;
|
|
4
4
|
export declare function isETHAddress(addr: string): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export declare const getPlatformId: (chainId: ChainId) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenInfo } from '../hooks/Token';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import BigNumber from 'bignumber.js';
|
|
4
4
|
export declare const getTokenSymbolDisplay: (baseToken: TokenInfo) => string;
|
|
5
5
|
export declare const getSwapTxValue: ({ tokenAmount, tokenAddress, chainId, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function MyCreated({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
5
|
account?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
5
|
account?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PoolApi, ExcludeNone } from '@dodoex/api';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { TokenInfo } from '../../hooks/Token';
|
|
4
4
|
import { OperatePool } from './PoolOperate/types';
|
|
5
5
|
export declare const poolApi: PoolApi;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '@dodoex/components';
|
|
3
|
-
import { ChainId } from '
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
4
|
export default function NeedConnectButton({ chainId, includeButton, ...props }: ButtonProps & {
|
|
5
5
|
/** chainId that needs to be connected */
|
|
6
6
|
chainId?: ChainId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { TokenInfo } from '../../hooks/Token';
|
|
3
|
-
import { ChainId } from '
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
4
|
export interface TokenPickerProps {
|
|
5
5
|
chainId?: ChainId;
|
|
6
6
|
value?: TokenInfo | null | Array<TokenInfo>;
|
|
@@ -4,7 +4,7 @@ import { SupportedLang } from '../../constants/locales';
|
|
|
4
4
|
import { Web3ConnectorsProps } from '../../hooks/ConnectWallet';
|
|
5
5
|
import { InitTokenListProps } from '../../hooks/Token/useInitTokenList';
|
|
6
6
|
import { ExecutionProps } from '../../hooks/Submission';
|
|
7
|
-
import { ChainId } from '
|
|
7
|
+
import { ChainId } from '@dodoex/api';
|
|
8
8
|
import { DefaultTokenInfo } from '../../hooks/Token/type';
|
|
9
9
|
import { APIServices } from '../../constants/api';
|
|
10
10
|
import { SwapProps } from '../Swap';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ContractRequests, GraphQLRequests, TokenApi } from '@dodoex/api';
|
|
2
|
-
import { ChainId } from './chains';
|
|
1
|
+
import { ContractRequests, GraphQLRequests, TokenApi, ChainId } from '@dodoex/api';
|
|
3
2
|
export declare enum APIServiceKey {
|
|
4
3
|
routePrice = "routePrice",
|
|
5
4
|
fiatPrice = "fiatPrice",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenInfo } from '../hooks/Token';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
export declare function getAuthSwitchCache(): boolean;
|
|
4
4
|
export declare function setAuthSwitchCache(isAuto: boolean): void;
|
|
5
5
|
export interface LastTokenCache {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export declare function useCurrentChainId(): ChainId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Provider as Eip1193Provider } from '@web3-react/types';
|
|
2
2
|
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
|
-
import { ChainId } from '
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
4
|
import { Web3Connection } from './web3';
|
|
5
5
|
import { WalletType } from '../../constants/wallet';
|
|
6
6
|
export interface Web3ConnectorsProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Web3ReactHooks } from '@web3-react/core';
|
|
2
2
|
import { Connector, Provider as Eip1193Provider } from '@web3-react/types';
|
|
3
3
|
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
4
|
-
import
|
|
4
|
+
import { ChainId } from '@dodoex/api';
|
|
5
5
|
export declare type Web3Connection = [Connector, Web3ReactHooks];
|
|
6
6
|
export declare function getConnectionFromProvider(onError: (error: Error) => void, provider?: JsonRpcProvider | Eip1193Provider): Web3Connection | undefined;
|
|
7
7
|
export declare function getConnectionFromWalletConnect(useDefault: boolean, jsonRpcUrlMap: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export default function getExecutionErrorMsg(chainId: ChainId, message: string): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { TokenInfo, TokenList } from './type';
|
|
4
|
-
import { ChainId } from '
|
|
4
|
+
import { ChainId } from '@dodoex/api';
|
|
5
5
|
export declare const getFuzzySearchTokenSort: (token: TokenInfo, search: string, { matchAddress, }?: {
|
|
6
6
|
matchAddress?: boolean | undefined;
|
|
7
7
|
}) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppThunkAction } from '.';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { State } from '../reducers/wallet';
|
|
4
4
|
export declare const setDefaultChainId: (chainId: ChainId) => AppThunkAction;
|
|
5
5
|
export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import type { DefaultTokenInfo } from '../../hooks/Token';
|
|
3
3
|
import { RootState } from '../reducers';
|
|
4
4
|
export declare const getTokenList: (state?: RootState) => import("../../hooks/Token").TokenList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export declare const isSameAddress: (tokenAddress1: string, tokenAddress2: string) => boolean;
|
|
3
3
|
export declare function isAddress(value: any): boolean;
|
|
4
4
|
export declare function isETHAddress(addr: string): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export declare const getPlatformId: (chainId: ChainId) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenInfo } from '../hooks/Token';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import BigNumber from 'bignumber.js';
|
|
4
4
|
export declare const getTokenSymbolDisplay: (baseToken: TokenInfo) => string;
|
|
5
5
|
export declare const getSwapTxValue: ({ tokenAmount, tokenAddress, chainId, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainId } from '
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function MyCreated({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
5
|
account?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
5
|
account?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PoolApi, ExcludeNone } from '@dodoex/api';
|
|
2
|
-
import { ChainId } from '
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { TokenInfo } from '../../hooks/Token';
|
|
4
4
|
import { OperatePool } from './PoolOperate/types';
|
|
5
5
|
export declare const poolApi: PoolApi;
|