@dodoex/widgets 3.0.2-pool.5 → 3.0.2-pool.6

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 (36) hide show
  1. package/dist/{helper-BBnCAYWT.cjs → helper-B_Tw1xwm.cjs} +1 -1
  2. package/dist/{helper-jVOanib6.js → helper-DH5EW49p.js} +1 -1
  3. package/dist/index-8qgu6ZUT.cjs +31 -0
  4. package/dist/index-B3qB5u5w.js +78 -0
  5. package/dist/{index-BEv2dtyt.js → index-BbKWmWi9.js} +1 -1
  6. package/dist/{index-C7QUVsYt.cjs → index-Cjr5Rex6.cjs} +5 -5
  7. package/dist/index-CmSQCThu.js +31 -0
  8. package/dist/{index-C3Ugac-u.cjs → index-OHtgzvn0.cjs} +2 -2
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/types/components/Widget/index.d.ts +0 -1
  12. package/dist/types/components/WidgetContainer.d.ts +1 -1
  13. package/dist/types/hooks/useGlobalState.d.ts +32 -0
  14. package/dist/types/hooks/useTokenState.d.ts +18 -0
  15. package/dist/types/utils/token.d.ts +1 -1
  16. package/dist/types/widgets/MiningWidget/hooks/helper.d.ts +2 -2
  17. package/dist/types/widgets/MiningWidget/hooks/useReviewRewardToken.d.ts +2 -2
  18. package/package.json +1 -1
  19. package/dist/index-5zJ4_a3U.js +0 -78
  20. package/dist/index-BVzjted7.js +0 -31
  21. package/dist/index-X_Iyg_-4.cjs +0 -31
  22. package/dist/types/store/actions/globals.d.ts +0 -9
  23. package/dist/types/store/actions/index.d.ts +0 -4
  24. package/dist/types/store/actions/settings.d.ts +0 -3
  25. package/dist/types/store/actions/token.d.ts +0 -7
  26. package/dist/types/store/actions/wallet.d.ts +0 -6
  27. package/dist/types/store/index.d.ts +0 -12
  28. package/dist/types/store/reducers/globals.d.ts +0 -21
  29. package/dist/types/store/reducers/index.d.ts +0 -17
  30. package/dist/types/store/reducers/settings.d.ts +0 -8
  31. package/dist/types/store/reducers/token.d.ts +0 -22
  32. package/dist/types/store/reducers/wallet.d.ts +0 -13
  33. package/dist/types/store/selectors/globals.d.ts +0 -7
  34. package/dist/types/store/selectors/settings.d.ts +0 -2
  35. package/dist/types/store/selectors/token.d.ts +0 -6
  36. package/dist/types/store/selectors/wallet.d.ts +0 -6
@@ -1,9 +0,0 @@
1
- import { AppThunkAction } from '.';
2
- import { ContractStatus } from '../reducers/globals';
3
- export declare const setContractStatus: (contractStatus: ContractStatus) => AppThunkAction;
4
- export declare const setAutoConnectLoading: (loading: boolean) => AppThunkAction;
5
- export declare const setAutoSlippage: (autoSlippage: {
6
- loading: boolean;
7
- value: number | null;
8
- }) => AppThunkAction;
9
- export declare const setAutoSlippageLoading: (loading: boolean) => AppThunkAction;
@@ -1,4 +0,0 @@
1
- import { Action, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit';
2
- import { RootState } from '../reducers';
3
- export type AppThunkAction<Ret = void> = ThunkAction<Ret, RootState, unknown, Action<string>>;
4
- export type AppThunkDispatch = ThunkDispatch<RootState, unknown, Action<string>>;
@@ -1,3 +0,0 @@
1
- import { AppThunkAction } from '.';
2
- import { Slippage } from '../reducers/settings';
3
- export declare const setSlippage: (slippage: Slippage) => AppThunkAction;
@@ -1,7 +0,0 @@
1
- import { AppThunkAction } from '.';
2
- import { TokenList, TokenInfo } from '../../hooks/Token';
3
- import { SlippageWithToken } from '../reducers/token';
4
- export declare const setTokenList: (tokenList: TokenList) => AppThunkAction;
5
- export declare const setPopularTokenList: (popularTokenList: TokenList) => AppThunkAction;
6
- export declare const setSlippageWithTokens: (slippageWithTokens: SlippageWithToken[]) => AppThunkAction;
7
- export declare const setDefaultToToken: (token: TokenInfo) => AppThunkAction;
@@ -1,6 +0,0 @@
1
- import { AppThunkAction } from '.';
2
- import { ChainId } from '@dodoex/api';
3
- import { State } from '../reducers/wallet';
4
- export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
5
- export declare const setBlockNumber: (blockNumber: number) => AppThunkAction;
6
- export declare const setOpenConnectWalletInfo: (openConnectWalletInfo: State["openConnectWalletInfo"]) => AppThunkAction;
@@ -1,12 +0,0 @@
1
- /** @ts-ignore */
2
- export declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").CombinedState<{
3
- settings: import("./reducers/settings").State;
4
- wallet: import("./reducers/wallet").State;
5
- token: import("./reducers/token").State;
6
- globals: import("./reducers/globals").State;
7
- }>, import("redux").AnyAction, [import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
8
- settings: import("./reducers/settings").State;
9
- wallet: import("./reducers/wallet").State;
10
- token: import("./reducers/token").State;
11
- globals: import("./reducers/globals").State;
12
- }>, import("redux").AnyAction>]>;
@@ -1,21 +0,0 @@
1
- import { AnyAction } from 'redux';
2
- export declare enum ContractStatus {
3
- Initial = "Initial",
4
- Pending = "Pending",
5
- ApproveSuccess = "ApproveSuccess",
6
- TxSuccess = "TxSuccess",
7
- Failed = "Failed"
8
- }
9
- export interface State {
10
- contractStatus?: ContractStatus;
11
- autoConnectLoading?: boolean;
12
- showCoingecko?: boolean;
13
- /** source: props.getAutoSlippage */
14
- autoSlippage?: {
15
- loading: boolean;
16
- value: number | null;
17
- };
18
- }
19
- export declare const initialState: State;
20
- declare const _default: (state: State | undefined, action: AnyAction) => State;
21
- export default _default;
@@ -1,17 +0,0 @@
1
- import { State as settingsState } from './settings';
2
- import { State as walletState } from './wallet';
3
- import { State as tokenState } from './token';
4
- import { State as globalState } from './globals';
5
- export interface RootState {
6
- settings: settingsState;
7
- wallet: walletState;
8
- token: tokenState;
9
- globals: globalState;
10
- }
11
- declare const _default: () => import("redux").Reducer<import("redux").CombinedState<{
12
- settings: settingsState;
13
- wallet: walletState;
14
- token: tokenState;
15
- globals: globalState;
16
- }>, import("redux").AnyAction>;
17
- export default _default;
@@ -1,8 +0,0 @@
1
- import { AnyAction } from 'redux';
2
- export type Slippage = string | null;
3
- export type State = {
4
- slippage: Slippage;
5
- };
6
- export declare const initialState: State;
7
- declare const _default: (state: State | undefined, action: AnyAction) => State;
8
- export default _default;
@@ -1,22 +0,0 @@
1
- import BigNumber from 'bignumber.js';
2
- import { AnyAction } from 'redux';
3
- import type { TokenList } from '../../hooks/Token';
4
- export type AccountBalance = {
5
- tokenBalances?: BigNumber;
6
- tokenAllowances?: BigNumber;
7
- };
8
- export type AccountBalances = {
9
- [key in string]: AccountBalance;
10
- };
11
- export type SlippageWithToken = {
12
- slippage: string;
13
- tokens: string[];
14
- };
15
- export type State = {
16
- tokenList: TokenList;
17
- popularTokenList: TokenList;
18
- slippageWithTokens: SlippageWithToken[];
19
- };
20
- export declare const initialState: State;
21
- declare const _default: (state: State | undefined, action: AnyAction) => State;
22
- export default _default;
@@ -1,13 +0,0 @@
1
- import { AnyAction } from 'redux';
2
- import { ChainId } from '@dodoex/api';
3
- export type State = {
4
- fromTokenChainId?: ChainId;
5
- latestBlockNumber: number;
6
- openConnectWalletInfo: boolean | {
7
- /** Wallet is connected, chainID needs to be switched */
8
- chainId?: ChainId;
9
- };
10
- };
11
- export declare const initialState: State;
12
- declare const _default: (state: State | undefined, action: AnyAction) => State;
13
- export default _default;
@@ -1,7 +0,0 @@
1
- import { RootState } from '../reducers';
2
- export declare const getContractStatus: (state?: RootState) => import("../reducers/globals").ContractStatus | undefined;
3
- export declare const getAutoConnectLoading: (state?: RootState) => boolean | undefined;
4
- export declare const getAutoSlippage: (state?: RootState) => {
5
- loading: boolean;
6
- value: number | null;
7
- } | undefined;
@@ -1,2 +0,0 @@
1
- import { RootState } from '../reducers';
2
- export declare const getSlippage: (state?: RootState) => import("../reducers/settings").Slippage;
@@ -1,6 +0,0 @@
1
- import { ChainId } from '@dodoex/api';
2
- import { RootState } from '../reducers';
3
- export declare const getTokenList: (state?: RootState) => import("../../hooks/Token").TokenList;
4
- export declare const getAllTokenList: (state?: RootState) => import("../../hooks/Token").TokenInfo[];
5
- export declare const getPopularTokenList: (chainId: ChainId, state?: RootState) => import("../../hooks/Token").TokenInfo[];
6
- export declare const getSlippageWithTokens: (state?: RootState) => import("../reducers/token").SlippageWithToken[];
@@ -1,6 +0,0 @@
1
- import { RootState } from '../reducers';
2
- export declare const getFromTokenChainId: (state?: RootState) => import("@dodoex/api").ChainId | undefined;
3
- export declare const getLatestBlockNumber: (state?: RootState) => number;
4
- export declare const getOpenConnectWalletInfo: (state?: RootState) => boolean | {
5
- chainId?: import("@dodoex/api").ChainId;
6
- };