@dodoex/widgets 2.6.12-beta.9 → 3.0.0-bartio.0

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.
Files changed (87) hide show
  1. package/dist/cjs/components/Swap/index.d.ts +2 -1
  2. package/dist/cjs/constants/chains.d.ts +1 -0
  3. package/dist/cjs/e4364db573253fd1.svg +9 -0
  4. package/dist/cjs/helper-BYlVZIoD.cjs +1 -0
  5. package/dist/cjs/helper-DgveuxqY.cjs +1 -0
  6. package/dist/cjs/index-BeusDCM3.cjs +78 -0
  7. package/dist/cjs/index-BfpsZhht.cjs +53 -0
  8. package/dist/cjs/index-CThIhzMz.cjs +12 -0
  9. package/dist/cjs/index-D7H_RrAc.cjs +12 -0
  10. package/dist/cjs/index-Vi-XUi2H.cjs +53 -0
  11. package/dist/cjs/index-z-Q7UNom.cjs +78 -0
  12. package/dist/cjs/index.cjs +1 -45
  13. package/dist/cjs/locales/en-US.js +1 -5
  14. package/dist/cjs/locales/zh-CN.js +1 -5
  15. package/dist/cjs/lottie-BpUuS5q9.cjs +1 -0
  16. package/dist/cjs/lottie-DU4LN2MM.cjs +1 -0
  17. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/index.d.ts +1 -1
  18. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +2 -2
  19. package/dist/cjs/src/components/Swap/components/ConnectWallet/ConnectWalletDialog.d.ts +1 -2
  20. package/dist/cjs/src/components/Swap/components/ConnectWallet/index.d.ts +1 -2
  21. package/dist/cjs/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +2 -1
  22. package/dist/cjs/src/components/Swap/components/TokenCard/index.d.ts +2 -2
  23. package/dist/cjs/src/components/Swap/index.d.ts +1 -2
  24. package/dist/cjs/src/components/TokenLogo.d.ts +3 -1
  25. package/dist/cjs/src/components/Widget/index.d.ts +0 -3
  26. package/dist/cjs/src/constants/chains.d.ts +1 -2
  27. package/dist/cjs/src/constants/tokenList.d.ts +2 -11
  28. package/dist/cjs/src/hooks/Bridge/createBridgeOrder.d.ts +1 -1
  29. package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +1 -3
  30. package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +6 -25
  31. package/dist/cjs/src/hooks/Submission/types.d.ts +0 -14
  32. package/dist/cjs/src/hooks/Submission/useExecution.d.ts +0 -14
  33. package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.d.ts +1 -1
  34. package/dist/cjs/src/hooks/Swap/usePriceTimer.d.ts +0 -1
  35. package/dist/cjs/src/hooks/Token/type.d.ts +0 -1
  36. package/dist/cjs/src/hooks/Token/useGetTokenStatus.d.ts +1 -2
  37. package/dist/cjs/src/hooks/Token/useInitTokenList.d.ts +1 -3
  38. package/dist/cjs/src/hooks/Widget/useInitPropsToRedux.d.ts +1 -1
  39. package/dist/cjs/src/hooks/contract/useFetchTokens.d.ts +2 -1
  40. package/dist/cjs/src/index.d.ts +0 -2
  41. package/dist/cjs/src/store/actions/wallet.d.ts +0 -1
  42. package/dist/cjs/src/store/reducers/wallet.d.ts +0 -1
  43. package/dist/cjs/src/store/selectors/wallet.d.ts +0 -1
  44. package/dist/components/Swap/index.d.ts +2 -1
  45. package/dist/constants/chains.d.ts +1 -0
  46. package/dist/e4364db573253fd1.svg +9 -0
  47. package/dist/helper-BPAb-D4D.js +1 -0
  48. package/dist/helper-CZiT1I7S.js +1 -0
  49. package/dist/index-BIQtzxL9.js +78 -0
  50. package/dist/index-Bbuw1I9-.js +12 -0
  51. package/dist/index-Bs-0ogXO.js +12 -0
  52. package/dist/index-C-2UnSDv.js +53 -0
  53. package/dist/index-D3PtHdfy.js +78 -0
  54. package/dist/index-JfQcHFPg.js +53 -0
  55. package/dist/index.js +1 -45
  56. package/dist/locales/en-US.js +1 -5
  57. package/dist/locales/zh-CN.js +1 -5
  58. package/dist/lottie-DLUL4WjE.js +1 -0
  59. package/dist/lottie-KOTVYEky.js +1 -0
  60. package/dist/src/components/Bridge/BridgeSummaryDialog/index.d.ts +1 -1
  61. package/dist/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +2 -2
  62. package/dist/src/components/Swap/components/ConnectWallet/ConnectWalletDialog.d.ts +1 -2
  63. package/dist/src/components/Swap/components/ConnectWallet/index.d.ts +1 -2
  64. package/dist/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +2 -1
  65. package/dist/src/components/Swap/components/TokenCard/index.d.ts +2 -2
  66. package/dist/src/components/Swap/index.d.ts +1 -2
  67. package/dist/src/components/TokenLogo.d.ts +3 -1
  68. package/dist/src/components/Widget/index.d.ts +0 -3
  69. package/dist/src/constants/chains.d.ts +1 -2
  70. package/dist/src/constants/tokenList.d.ts +2 -11
  71. package/dist/src/hooks/Bridge/createBridgeOrder.d.ts +1 -1
  72. package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +1 -3
  73. package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +6 -25
  74. package/dist/src/hooks/Submission/types.d.ts +0 -14
  75. package/dist/src/hooks/Submission/useExecution.d.ts +0 -14
  76. package/dist/src/hooks/Swap/useFetchFiatPrice.d.ts +1 -1
  77. package/dist/src/hooks/Swap/usePriceTimer.d.ts +0 -1
  78. package/dist/src/hooks/Token/type.d.ts +0 -1
  79. package/dist/src/hooks/Token/useGetTokenStatus.d.ts +1 -2
  80. package/dist/src/hooks/Token/useInitTokenList.d.ts +1 -3
  81. package/dist/src/hooks/Widget/useInitPropsToRedux.d.ts +1 -1
  82. package/dist/src/hooks/contract/useFetchTokens.d.ts +2 -1
  83. package/dist/src/index.d.ts +0 -2
  84. package/dist/src/store/actions/wallet.d.ts +0 -1
  85. package/dist/src/store/reducers/wallet.d.ts +0 -1
  86. package/dist/src/store/selectors/wallet.d.ts +0 -1
  87. package/package.json +23 -22
@@ -6,7 +6,7 @@ export interface BridgeTXRequest {
6
6
  value: string;
7
7
  from: string;
8
8
  chainId: number;
9
- encodeId?: string;
9
+ encodeId: string;
10
10
  }
11
11
  export default function BridgeSummaryDialog({ open, onClose, route, bridgeOrderTxRequest, clearToAmt, clearFromAmt, }: {
12
12
  open: boolean;
@@ -10,12 +10,12 @@ export default function RouteCard({ fromToken, toToken, fromChainId, toChainId,
10
10
  fromAmount?: BridgeRouteI['fromAmount'];
11
11
  fromTokenBalance: BigNumber | null;
12
12
  toTokenAmount?: BigNumber | null;
13
- toolDetails: undefined | Exclude<BridgeRouteI['step'], undefined>['toolDetails'];
13
+ toolDetails: BridgeRouteI['step']['toolDetails'];
14
14
  product: BridgeRouteI['product'];
15
15
  executionDuration: BridgeRouteI['executionDuration'];
16
16
  feeUSD: BridgeRouteI['feeUSD'];
17
17
  selected: boolean;
18
18
  setSelected: () => void;
19
- spenderContractAddress: string | undefined;
19
+ spenderContractAddress: string;
20
20
  isBestPrice?: boolean;
21
21
  }): JSX.Element;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- export default function ConnectWalletDialog({ open, onClose, chainId: chainIdProps, }: {
2
+ export default function ConnectWalletDialog({ open, onClose, }: {
3
3
  open: boolean;
4
4
  onClose: () => void;
5
- chainId?: number;
6
5
  }): JSX.Element;
@@ -2,8 +2,7 @@
2
2
  import { ChainId } from '../../../../constants/chains';
3
3
  export interface ConnectWalletProps {
4
4
  needSwitchChain?: ChainId;
5
- needEvmChainId?: ChainId;
6
5
  /** If true is returned, the default wallet connection logic will not be executed */
7
6
  onConnectWalletClick?: () => boolean | Promise<boolean>;
8
7
  }
9
- export default function ConnectWallet({ needSwitchChain, needEvmChainId, onConnectWalletClick, }: ConnectWalletProps): JSX.Element;
8
+ export default function ConnectWallet({ needSwitchChain, onConnectWalletClick, }: ConnectWalletProps): JSX.Element;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { TokenPickerProps } from '../../../TokenPicker';
3
- export declare function TokenLogoCollapse({ token, onClick, showChainLogo, }: {
3
+ export declare function TokenLogoCollapse({ token, onClick, showChainLogo, showChainName: showChainNameProps, }: {
4
4
  token?: TokenPickerProps['value'];
5
5
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
6
6
  showChainLogo?: boolean;
7
+ showChainName?: boolean;
7
8
  }): JSX.Element;
@@ -17,7 +17,7 @@ export interface TokenCardProps {
17
17
  onTokenChange: TokenPickerProps['onChange'];
18
18
  side?: TokenPickerProps['side'];
19
19
  showChainLogo?: boolean;
20
- onlyCurrentChain?: boolean;
20
+ showChainName?: boolean;
21
21
  defaultLoadBalance?: boolean;
22
22
  }
23
- export declare function TokenCard({ sx, amt, token, readOnly, showMaxBtn, onMaxClick, fiatPriceTxt, occupiedAddrs, occupiedChainId, onInputFocus, onTokenClick, onInputChange, onTokenChange, side, showChainLogo, onlyCurrentChain, defaultLoadBalance, }: TokenCardProps): JSX.Element;
23
+ export declare function TokenCard({ sx, amt, token, readOnly, showMaxBtn, onMaxClick, fiatPriceTxt, occupiedAddrs, occupiedChainId, onInputFocus, onTokenClick, onInputChange, onTokenChange, side, showChainLogo, showChainName, defaultLoadBalance, }: TokenCardProps): JSX.Element;
@@ -5,6 +5,5 @@ export interface SwapProps {
5
5
  /** Higher priority setting slippage */
6
6
  getAutoSlippage?: GetAutoSlippage;
7
7
  onConnectWalletClick?: ConnectWalletProps['onConnectWalletClick'];
8
- bridgeToTonUrl?: string;
9
8
  }
10
- export declare function Swap({ getAutoSlippage, onConnectWalletClick, bridgeToTonUrl, }?: SwapProps): JSX.Element;
9
+ export declare function Swap({ getAutoSlippage, onConnectWalletClick, }?: SwapProps): JSX.Element;
@@ -12,5 +12,7 @@ export interface TokenLogoProps {
12
12
  cross?: boolean;
13
13
  sx?: BoxProps['sx'];
14
14
  chainId?: number;
15
+ chainSize?: number;
16
+ logoOffset?: number;
15
17
  }
16
- export default function TokenLogo({ width, height, marginRight, url, zIndex, cross, address: addressProps, token: tokenProps, sx, chainId, }: TokenLogoProps): React.ReactElement;
18
+ export default function TokenLogo({ width, height, marginRight, url, zIndex, cross, address: addressProps, token: tokenProps, sx, chainId, chainSize, logoOffset: logoOffsetProps, }: TokenLogoProps): React.ReactElement;
@@ -8,9 +8,7 @@ import { ChainId } from '../../constants/chains';
8
8
  import { DefaultTokenInfo } from '../../hooks/Token/type';
9
9
  import { APIServices } from '../../constants/api';
10
10
  import { SwapProps } from '../Swap';
11
- import { QueryClient } from '@tanstack/react-query';
12
11
  export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
13
- export declare const queryClient: QueryClient;
14
12
  export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps, SwapProps {
15
13
  apikey?: string;
16
14
  theme?: ThemeOptions;
@@ -28,7 +26,6 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
28
26
  apiServices?: Partial<APIServices>;
29
27
  crossChain?: boolean;
30
28
  noPowerBy?: boolean;
31
- tonConnect?: boolean;
32
29
  onProviderChanged?: (provider?: any) => void;
33
30
  }
34
31
  export declare function Widget(props: PropsWithChildren<WidgetProps>): JSX.Element;
@@ -13,8 +13,7 @@ export declare enum ChainId {
13
13
  LINEA = 59144,
14
14
  SCROLL = 534352,
15
15
  MANTA = 169,
16
- MANTLE = 5000,
17
- TON = -239
16
+ MANTLE = 5000
18
17
  }
19
18
  export declare const rpcServerMap: {
20
19
  [key in ChainId]: Array<string>;
@@ -1,18 +1,9 @@
1
- declare const _default: ({
1
+ declare const _default: {
2
2
  chainId: number;
3
3
  address: string;
4
4
  name: string;
5
5
  decimals: number;
6
6
  symbol: string;
7
7
  logoURI: string;
8
- canBridgeToTon?: undefined;
9
- } | {
10
- chainId: number;
11
- address: string;
12
- name: string;
13
- decimals: number;
14
- symbol: string;
15
- logoURI: string;
16
- canBridgeToTon: boolean;
17
- })[];
8
+ }[];
18
9
  export default _default;
@@ -12,7 +12,7 @@ export interface BridgeOrderCreateParams {
12
12
  hash: string;
13
13
  product: string | null;
14
14
  extend: {
15
- lifiBridge: Exclude<BridgeRouteI['sourceRoute'], undefined>['step']['tool'];
15
+ lifiBridge: BridgeRouteI['sourceRoute']['step']['tool'];
16
16
  route: BridgeRouteI['sourceRoute'];
17
17
  productParams: BridgeRouteI['productParams'];
18
18
  encodeId: string;
@@ -1,8 +1,6 @@
1
1
  import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
2
2
  import { BridgeRouteI } from './useFetchRoutePriceBridge';
3
- import { ExecutionCtx } from '../Submission/types';
4
- export default function useExecuteBridgeRoute({ route, bridgeOrderTxRequest, sendData, }: {
3
+ export default function useExecuteBridgeRoute({ route, bridgeOrderTxRequest, }: {
5
4
  route?: BridgeRouteI;
6
5
  bridgeOrderTxRequest?: BridgeTXRequest;
7
- sendData?: Parameters<ExecutionCtx['executeCustom']>['0']['handler'];
8
6
  }): () => Promise<import("../Submission/types").ExecutionResult> | undefined;
@@ -1,6 +1,5 @@
1
1
  import { TokenInfo } from '../Token';
2
2
  import BigNumber from 'bignumber.js';
3
- import { ExecutionCtx } from '../Submission/types';
4
3
  export interface BridgeRouteI {
5
4
  /** update */
6
5
  key: string;
@@ -18,29 +17,20 @@ export interface BridgeRouteI {
18
17
  toAddress: string;
19
18
  /** from parameter */
20
19
  product: string | null;
21
- slippage?: number;
20
+ slippage: number;
22
21
  /** in seconds */
23
22
  roundedRouteCostTime: number;
24
23
  /** approve contract address */
25
- spenderContractAddress?: string;
24
+ spenderContractAddress: string;
26
25
  /** USD */
27
26
  feeUSD: string | null;
28
27
  /** in seconds */
29
28
  executionDuration: number | null;
30
29
  /** one-click */
31
30
  step: BridgeStep;
32
- encodeParams?: any;
33
- encodeResultData?: {
34
- data: string;
35
- to: string;
36
- value: string;
37
- from: string;
38
- chainId: number;
39
- encodeId?: string;
40
- };
41
- sendData?: Parameters<ExecutionCtx['executeCustom']>['0']['handler'];
31
+ encodeParams: any;
42
32
  productParams: any;
43
- sourceRoute?: {
33
+ sourceRoute: {
44
34
  toAmount: string;
45
35
  feeUSD: string | null;
46
36
  executionDuration: number | null;
@@ -57,8 +47,6 @@ export interface BridgeRouteI {
57
47
  };
58
48
  fee: any;
59
49
  };
60
- minAmt?: string;
61
- maxAmt?: string;
62
50
  }
63
51
  export interface BridgeTokenI {
64
52
  id: number;
@@ -85,7 +73,7 @@ export interface BridgeStep {
85
73
  tool: string;
86
74
  toolDetails: BridgeStepTool;
87
75
  type: string | null;
88
- includedSteps?: Array<{
76
+ includedSteps: Array<{
89
77
  id: string;
90
78
  /**
91
79
  * bridge or swap
@@ -106,16 +94,9 @@ export interface FetchRoutePrice {
106
94
  fromToken: TokenInfo | null;
107
95
  toToken: TokenInfo | null;
108
96
  fromAmount: string;
109
- fromFiatPrice: string;
110
- fromAddress?: string;
111
- toAddress?: string;
112
97
  }
113
- export declare function useFetchRoutePriceBridge({ toToken, fromToken, fromAmount, fromFiatPrice, fromAddress: fromAddressProps, toAddress: toAddressProps, }: FetchRoutePrice): {
98
+ export declare function useFetchRoutePriceBridge({ toToken, fromToken, fromAmount, }: FetchRoutePrice): {
114
99
  status: RoutePriceStatus;
115
100
  refetch: () => Promise<void>;
116
101
  bridgeRouteList: BridgeRouteI[];
117
- limit: {
118
- minAmt?: number | undefined;
119
- maxAmt?: number | undefined;
120
- } | null;
121
102
  };
@@ -37,20 +37,6 @@ export declare type ExecutionCtx = {
37
37
  * @param submittedConfirmBack: dismiss callback
38
38
  */
39
39
  execute: (brief: string, spec: StepSpec, subtitle?: string | React.ReactNode | null, early?: boolean, submittedBack?: () => void, mixpanelProps?: Record<string, any>, submittedConfirmBack?: () => void, successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void) => Promise<ExecutionResult>;
40
- executeCustom: ({ brief, subtitle, early, mixpanelProps, submittedBack, submittedConfirmBack, successBack, handler, }: {
41
- brief: string;
42
- subtitle?: string | React.ReactNode | null;
43
- early?: boolean | undefined;
44
- mixpanelProps?: Record<string, any> | undefined;
45
- submittedBack?: (() => void) | undefined;
46
- submittedConfirmBack?: (() => void) | undefined;
47
- successBack?: ((tx: string, callback?: ExecutionProps['onTxSuccess']) => void) | undefined;
48
- handler: (params: {
49
- onSubmit?: (tx: string, reportInfo?: Record<string, any>) => void;
50
- onSuccess?: (tx: string, reportInfo?: Record<string, any>) => Promise<void>;
51
- onError?: (e: any) => void;
52
- }) => Promise<any>;
53
- }) => Promise<ExecutionResult>;
54
40
  /**
55
41
  * order
56
42
  */
@@ -23,20 +23,6 @@ export default function useExecution({ onTxFail, onTxSubmit, onTxSuccess, }?: Ex
23
23
  closeShowing: () => void;
24
24
  ctxVal: {
25
25
  execute: (brief: string, spec: StepSpec, subtitle?: string | React.ReactNode | null, early?: boolean, submittedBack?: () => void, mixpanelProps?: Record<string, any>, submittedConfirmBack?: () => void, successBack?: ((tx: string, callback?: ExecutionProps['onTxSuccess']) => void) | undefined) => Promise<ExecutionResult.Failed | ExecutionResult.Success | ExecutionResult.Submitted>;
26
- executeCustom: ({ brief, subtitle, early, mixpanelProps, submittedBack, submittedConfirmBack, successBack, handler, }: {
27
- brief: string;
28
- subtitle?: string | React.ReactNode | null;
29
- early?: boolean | undefined;
30
- mixpanelProps?: Record<string, any> | undefined;
31
- submittedBack?: (() => void) | undefined;
32
- submittedConfirmBack?: (() => void) | undefined;
33
- successBack?: ((tx: string, callback?: ExecutionProps['onTxSuccess']) => void) | undefined;
34
- handler: (params: {
35
- onSubmit?: ((tx: string, reportInfo?: Record<string, any>) => void) | undefined;
36
- onSuccess?: ((tx: string, reportInfo?: Record<string, any>) => Promise<void>) | undefined;
37
- onError?: ((e: any) => void) | undefined;
38
- }) => Promise<any>;
39
- }) => Promise<ExecutionResult>;
40
26
  requests: Map<string, [Request, State]>;
41
27
  setShowing: import("react").Dispatch<import("react").SetStateAction<Showing | null>>;
42
28
  waitingSubmit: boolean;
@@ -1,7 +1,7 @@
1
1
  import { ChainId } from '../../constants/chains';
2
2
  import { TokenInfo } from '../Token';
3
3
  export interface FetchFiatPriceProps {
4
- chainId?: ChainId;
4
+ chainId: ChainId | undefined;
5
5
  fromToken: TokenInfo | null;
6
6
  toToken: TokenInfo | null;
7
7
  }
@@ -1,4 +1,3 @@
1
- export declare const refreshTime: number;
2
1
  export interface PriceTimerProps {
3
2
  refetch: () => void;
4
3
  interval?: number;
@@ -8,7 +8,6 @@ export interface TokenInfo {
8
8
  readonly tags?: string[];
9
9
  readonly extensions?: any;
10
10
  readonly side?: 'from' | 'to';
11
- readonly canBridgeToTon?: boolean;
12
11
  }
13
12
  export interface DefaultTokenInfo extends TokenInfo {
14
13
  amount?: number;
@@ -1,11 +1,10 @@
1
1
  import BigNumber from 'bignumber.js';
2
2
  import { TokenInfo, ApprovalState } from './type';
3
- export declare const useGetTokenStatus: ({ account, chainId, offset, contractAddress, skip, }: {
3
+ export declare const useGetTokenStatus: ({ account, chainId, offset, contractAddress, }: {
4
4
  account?: string | undefined;
5
5
  chainId: number | undefined;
6
6
  offset?: BigNumber | undefined;
7
7
  contractAddress?: string | undefined;
8
- skip?: boolean | undefined;
9
8
  }) => {
10
9
  getApprovalState: (token: TokenInfo | null, value: string | number | BigNumber, overrideBalance?: BigNumber) => ApprovalState;
11
10
  getPendingRest: (token?: TokenInfo | null) => boolean;
@@ -3,6 +3,4 @@ export interface InitTokenListProps {
3
3
  tokenList?: TokenList | TokenListType;
4
4
  popularTokenList?: TokenList;
5
5
  }
6
- export default function useInitTokenList({ tokenList, popularTokenList, isTon, }: InitTokenListProps & {
7
- isTon: boolean;
8
- }): void;
6
+ export default function useInitTokenList({ tokenList, popularTokenList, }: InitTokenListProps): void;
@@ -1,2 +1,2 @@
1
1
  import { WidgetProps } from '../../components/Widget/';
2
- export declare function useInitPropsToRedux({ width, height, feeRate, rebateTo, colorMode, apikey, defaultChainId, defaultToToken, defaultFromToken, jsonRpcUrlMap, swapSlippage, bridgeSlippage, apiServices, crossChain, noPowerBy, tonConnect, }: WidgetProps): void;
2
+ export declare function useInitPropsToRedux({ width, height, feeRate, rebateTo, colorMode, apikey, defaultChainId, defaultToToken, defaultFromToken, jsonRpcUrlMap, swapSlippage, bridgeSlippage, apiServices, crossChain, noPowerBy, }: WidgetProps): void;
@@ -8,8 +8,9 @@ declare type TokenResult = {
8
8
  symbol?: string;
9
9
  name?: string;
10
10
  };
11
- export default function useFetchTokens({ tokenList, blockNumber, chainId, skip, }: {
11
+ export default function useFetchTokens({ tokenList, addresses: addressesProps, blockNumber, chainId, skip, }: {
12
12
  tokenList?: TokenList;
13
+ addresses?: string[];
13
14
  blockNumber?: number;
14
15
  chainId?: number;
15
16
  skip?: boolean;
@@ -2,7 +2,5 @@
2
2
  import { WidgetProps } from './components/Widget';
3
3
  export declare type SwapWidgetProps = WidgetProps;
4
4
  export type { TokenInfo } from './hooks/Token/type';
5
- export { default as BridgeTonSummaryDialog } from './components/Widget/BridgeTonSummaryDialog';
6
- export { Widget } from './components/Widget';
7
5
  export declare function SwapWidget(props: SwapWidgetProps): JSX.Element;
8
6
  export declare function InitSwapWidget(props: SwapWidgetProps): void;
@@ -2,5 +2,4 @@ import { AppThunkAction } from '.';
2
2
  import { ChainId } from '../../constants/chains';
3
3
  export declare const setDefaultChainId: (chainId: ChainId) => AppThunkAction;
4
4
  export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
5
- export declare const setToTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
6
5
  export declare const setBlockNumber: (blockNumber: number) => AppThunkAction;
@@ -3,7 +3,6 @@ import { ChainId } from '../../constants/chains';
3
3
  export declare type State = {
4
4
  chainId: ChainId;
5
5
  fromTokenChainId?: ChainId;
6
- toTokenChainId?: ChainId;
7
6
  latestBlockNumber: number;
8
7
  };
9
8
  export declare const initialState: State;
@@ -1,5 +1,4 @@
1
1
  import { RootState } from '../reducers';
2
2
  export declare const getDefaultChainId: (state?: RootState) => import("../../constants/chains").ChainId;
3
3
  export declare const getFromTokenChainId: (state?: RootState) => import("../../constants/chains").ChainId | undefined;
4
- export declare const getToTokenChainId: (state?: RootState) => import("../../constants/chains").ChainId | undefined;
5
4
  export declare const getLatestBlockNumber: (state?: RootState) => number;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dodoex/widgets",
3
- "version": "2.6.12-beta.9",
3
+ "version": "3.0.0-bartio.0",
4
4
  "description": "DODO Widgets",
5
5
  "source": "src/index.tsx",
6
- "types": "dist/src/index.d.ts",
6
+ "types": "dist/index.d.ts",
7
7
  "main": "dist/cjs/index.cjs",
8
8
  "module": "dist/index.js",
9
9
  "license": "GPL-3.0-or-later",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "exports": {
35
35
  ".": {
36
- "types": "./dist/src/index.d.ts",
36
+ "types": "./dist/index.d.ts",
37
37
  "import": "./dist/index.js",
38
38
  "require": "./dist/cjs/index.cjs"
39
39
  }
@@ -57,7 +57,8 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@babel/runtime": "^7.17.0",
60
- "@dodoex/components": "^2.0.1",
60
+ "@dodoex/api": ">=3.0.0-beta.4",
61
+ "@dodoex/components": ">=3.0.0-beta.0",
61
62
  "@dodoex/icons": "^2.0.1",
62
63
  "@emotion/react": "^11.10.0",
63
64
  "@emotion/styled": "^11.10.0",
@@ -66,13 +67,10 @@
66
67
  "@lingui/core": "^4.3.0",
67
68
  "@lingui/macro": "^4.3.0",
68
69
  "@lingui/react": "^4.3.0",
69
- "@orbs-network/ton-access": "^2.3.3",
70
70
  "@reduxjs/toolkit": "^1.6.1",
71
71
  "@semantic-release/changelog": "^6.0.1",
72
72
  "@semantic-release/git": "^10.0.1",
73
- "@tanstack/react-query": "^5.51.23",
74
- "@tonconnect/ui": "^2.0.6",
75
- "@twa-dev/sdk": "^7.8.0",
73
+ "@tanstack/react-query": "^5.18.1",
76
74
  "@web3-react/core": "8.2.0",
77
75
  "@web3-react/eip1193": "8.2.0",
78
76
  "@web3-react/metamask": "8.2.1",
@@ -80,16 +78,18 @@
80
78
  "@web3-react/walletconnect-v2": "8.3.6",
81
79
  "axios": "^0.27.2",
82
80
  "bignumber.js": "^9.0.2",
81
+ "dayjs": "^1.11.11",
83
82
  "identicon.js": "^2.3.3",
83
+ "konva": "^9.3.6",
84
84
  "lodash": "^4.17.21",
85
85
  "make-plural": "^7.0.0",
86
+ "react-icons": "^5.0.1",
87
+ "react-infinite-scroller": "^1.2.6",
88
+ "react-konva": "^18.2.10",
86
89
  "react-window": "^1.8.8",
90
+ "recharts": "^2.12.7",
87
91
  "semantic-release": "^19.0.2",
88
- "ton": "^13.9.0",
89
- "ton-core": "^0.53.0",
90
- "ton-crypto": "^3.2.0",
91
- "tonweb": "^0.0.66",
92
- "zustand": "^4.5.4"
92
+ "zustand": "^4.5.1"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "@babel/runtime": ">=7.17.0",
@@ -106,10 +106,13 @@
106
106
  "@lingui/cli": "^4.3.0",
107
107
  "@nomicfoundation/hardhat-network-helpers": "^1.0.6",
108
108
  "@nomiclabs/hardhat-ethers": "^2.1.1",
109
- "@rollup/plugin-babel": "^5.3.1",
110
- "@rollup/plugin-commonjs": "^22.0.0",
111
- "@rollup/plugin-json": "^4.1.0",
112
- "@rollup/plugin-replace": "^4.0.0",
109
+ "@rollup/plugin-babel": "^6.0.4",
110
+ "@rollup/plugin-commonjs": "^26.0.1",
111
+ "@rollup/plugin-json": "^6.1.0",
112
+ "@rollup/plugin-multi-entry": "^6.0.1",
113
+ "@rollup/plugin-replace": "^5.0.7",
114
+ "@rollup/plugin-terser": "^0.4.4",
115
+ "@rollup/plugin-url": "^8.0.2",
113
116
  "@svgr/rollup": "^6.2.1",
114
117
  "@testing-library/jest-dom": "^5.16.5",
115
118
  "@testing-library/react": "^13.4.0",
@@ -117,6 +120,7 @@
117
120
  "@types/identicon.js": "^2.3.1",
118
121
  "@types/jest": "^29.0.3",
119
122
  "@types/lodash": "^4.14.184",
123
+ "@types/react-infinite-scroller": "^1.2.5",
120
124
  "@types/react-window": "^1.8.5",
121
125
  "@uniswap/sdk-core": "^3.0.2",
122
126
  "babel-plugin-macros": "^3.1.0",
@@ -129,11 +133,8 @@
129
133
  "jest-environment-hardhat": "^1.1.9",
130
134
  "jest-environment-jsdom": "^29.0.3",
131
135
  "np": "^7.6.1",
132
- "rollup": "^2.75.5",
133
- "rollup-plugin-multi-input": "^1.3.1",
134
- "rollup-plugin-terser": "^7.0.2",
135
- "rollup-plugin-typescript2": "^0.32.0",
136
- "rollup-plugin-url": "^3.0.1",
136
+ "rollup": "^4.18.0",
137
+ "rollup-plugin-typescript2": "^0.36.0",
137
138
  "svg-jest": "^1.0.1",
138
139
  "ts-jest": "^29.0.1",
139
140
  "typescript": "^4.7.3"