@dhedge/trading-widget 1.1.2 → 1.1.4

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.
@@ -7,4 +7,7 @@ export declare const contractsAddressesMap: ContractsAddressesMap;
7
7
  export declare const contractsAbisMap: {
8
8
  [id in ContractId]: any;
9
9
  };
10
+ export declare const QUERY_KEYS: {
11
+ SYNTHETIX_ORACLES_UPDATE: string;
12
+ };
10
13
  export {};
@@ -4,6 +4,8 @@ import type { PoolDepositMethodName } from 'core-kit/types/trading.types';
4
4
  export declare const DEFAULT_PRECISION = 18;
5
5
  export declare const DEFAULT_POLLING_INTERVAL = 59000;
6
6
  export declare const SHORTEN_POLLING_INTERVAL = 30000;
7
+ export declare const EXTREMELY_SHORT_POLLING_INTERVAL = 15000;
8
+ export declare const DEFAULT_RETRIES_NUMBER = 5;
7
9
  export declare const DEFAULT_LOCK_TIME: string;
8
10
  export declare const CUSTOM_LOCK_TIME: string;
9
11
  export declare const DEFAULT_DEPOSIT_LOCKTIME_MAP: Record<PoolDepositMethodName, string>;
@@ -10,7 +10,7 @@ export { useExchangeRate } from './use-exchange-rate';
10
10
  export { useHandleTrade } from './use-handle-trade';
11
11
  export { useMinReceiveText } from './use-min-receive-text';
12
12
  export { useMaxSlippagePlaceholder } from './use-max-slippage-placeholder';
13
- export { useSynthetixV3OraclesUpdate } from './use-synthetix-v3-oracles-update';
13
+ export { useSynthetixV3OraclesUpdate } from './synthetix-v3/use-synthetix-v3-oracles-update';
14
14
  export { useDepositProjectedEarnings } from './projected-earnings/use-deposit-projected-earnings';
15
15
  export { useProjectedEarningsCore } from './projected-earnings/use-projected-earnings-core';
16
16
  export { useIsEasySwapperTrading } from './use-is-easy-swapper-trading';
@@ -0,0 +1,15 @@
1
+ import type { DefaultError, UseQueryOptions } from '@tanstack/react-query';
2
+ import type { usePublicClient } from 'wagmi';
3
+ import type { Address, TransactionRequest } from 'core-kit/types';
4
+ interface UseOraclesUpdateQueryVariables {
5
+ account?: Address;
6
+ chainId: number;
7
+ vaultAddress: string;
8
+ }
9
+ export declare const useOraclesUpdateTransactionData: ({ publicClient, account, chainId, vaultAddress, }: {
10
+ publicClient: NonNullable<ReturnType<typeof usePublicClient>> | undefined;
11
+ } & UseOraclesUpdateQueryVariables, options?: Omit<UseQueryOptions<TransactionRequest | null, DefaultError, TransactionRequest | null, [
12
+ string,
13
+ UseOraclesUpdateQueryVariables
14
+ ]>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TransactionRequest | null, Error>;
15
+ export {};
@@ -0,0 +1,4 @@
1
+ import { useSendTransaction } from 'core-kit/hooks/web3';
2
+ export declare const useSendOraclesUpdateTransaction: ({ chainId, }: {
3
+ chainId: number;
4
+ }) => ReturnType<typeof useSendTransaction>;
@@ -1,7 +1,3 @@
1
- import { useSendTransaction } from '../web3';
2
- export declare const useSendUpdateTransaction: ({ chainId, }: {
3
- chainId: number;
4
- }) => ReturnType<typeof useSendTransaction>;
5
1
  export declare const useSynthetixV3OraclesUpdate: ({ disabled, }: {
6
2
  disabled?: boolean | undefined;
7
3
  }) => {
@@ -1,10 +1,2 @@
1
- import type { usePublicClient } from 'core-kit/hooks/web3';
2
- import type { Address, TransactionRequest } from 'core-kit/types';
3
1
  export declare const isSynthetixV3Vault: (address: string) => boolean;
4
2
  export declare const isSynthetixV3Asset: (address: string) => boolean;
5
- export declare const getOracleUpdateTransaction: ({ publicClient, account, chainId, vaultAddress, }: {
6
- publicClient: NonNullable<ReturnType<typeof usePublicClient>>;
7
- account?: `0x${string}` | undefined;
8
- chainId: number;
9
- vaultAddress: string;
10
- }) => Promise<TransactionRequest | null>;