@dhedge/trading-widget 3.13.0-canary.5 → 3.13.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 (39) hide show
  1. package/README.md +11 -15
  2. package/core-kit/const/default-data.d.ts +0 -1
  3. package/core-kit/const/links.d.ts +0 -1
  4. package/core-kit/hooks/pool/use-pool-dynamic-exit-remaining-cooldown.d.ts +1 -1
  5. package/core-kit/hooks/state/action.d.ts +0 -1
  6. package/core-kit/hooks/trading/deposit-v2/index.d.ts +1 -1
  7. package/core-kit/hooks/trading/index.d.ts +3 -3
  8. package/core-kit/hooks/web3/index.d.ts +0 -1
  9. package/core-kit/types/state.types.d.ts +0 -1
  10. package/core-kit/types/trading-panel.types.d.ts +1 -2
  11. package/index.cjs +56 -56
  12. package/index.d.ts +1 -1
  13. package/index.js +9576 -9754
  14. package/package.json +4 -4
  15. package/style.css +1 -1
  16. package/trading-widget/components/deposit/button/trade-button/trade-button.d.ts +2 -0
  17. package/trading-widget/components/deposit/button/trade-button/trade-button.hooks.d.ts +6 -0
  18. package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.d.ts +2 -2
  19. package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +0 -1
  20. package/trading-widget/components/widget/widget-settings/index.d.ts +0 -1
  21. package/trading-widget/components/widget/widget-settings/slippage-selector/slippage-selector.hooks.d.ts +0 -1
  22. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -4
  23. package/core-kit/hooks/trading/deposit-v2/deposit-transaction/use-batch-approve-transaction.d.ts +0 -141
  24. package/core-kit/hooks/trading/deposit-v2/deposit-transaction/use-batch-deposit.d.ts +0 -1
  25. package/core-kit/hooks/trading/deposit-v2/deposit-transaction/use-deposit-common.d.ts +0 -6
  26. package/core-kit/hooks/trading/trade-handlers/use-batch-trading-settle-handler.d.ts +0 -5
  27. package/core-kit/hooks/web3/use-custom-send-calls.d.ts +0 -14
  28. package/core-kit/hooks/web3/use-is-batch-contract-writes-supported.d.ts +0 -1
  29. package/trading-widget/components/deposit/button/batch-trade-button.d.ts +0 -2
  30. package/trading-widget/components/deposit/button/deposit-trade-button.hooks.d.ts +0 -8
  31. package/trading-widget/components/deposit/button/single-trade-button.d.ts +0 -2
  32. package/trading-widget/components/deposit/meta/batched-transaction-tip.d.ts +0 -2
  33. package/trading-widget/components/deposit/meta/batched-transaction-tip.hooks.d.ts +0 -3
  34. package/trading-widget/components/widget/widget-settings/batch-transactions-switch/batch-transactions-switch.d.ts +0 -6
  35. package/trading-widget/components/widget/widget-settings/batch-transactions-switch/batch-transactions-switch.hooks.d.ts +0 -1
  36. /package/core-kit/hooks/trading/deposit-v2/{deposit-transaction/use-deposit.d.ts → use-deposit.d.ts} +0 -0
  37. /package/core-kit/hooks/trading/{trade-handlers/use-handle-trade.d.ts → use-handle-trade.d.ts} +0 -0
  38. /package/core-kit/hooks/trading/{trade-handlers/use-trading-result-handling.d.ts → use-trading-result-handling.d.ts} +0 -0
  39. /package/core-kit/hooks/trading/{trade-handlers/use-trading-settle-handler.d.ts → use-trading-settle-handler.d.ts} +0 -0
package/README.md CHANGED
@@ -150,17 +150,17 @@ UI configuration provider. Manages params to configure custom styling, component
150
150
  <code>Custom components to be injected into widget layout</code>
151
151
  </summary>
152
152
 
153
- > | name | type | default value | description |
154
- > | ------------------- | ----------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------- |
155
- > | `GeoBlockAlert` | ComponentType | `<GeoBlockAlert>` | Component replaces deposit button while `isGeoBlocked` config param is set to `true` |
156
- > | `SanctionedAlert` | ComponentType | `<SanctionedAlert>` | Component replaces deposit button while `isSanctioned` config param is set to `true` |
157
- > | `DepositMetaInfo` | ComponentType | `undefined` | Component is injected into deposit meta part of widget layout nearby TransactionOverviewDisclosure |
158
- > | `WithdrawMetaInfo` | ComponentType | `undefined` | Component is injected into withdraw meta part of widget layout nearby WithdrawTransactionOverviewDisclosure |
159
- > | `CustomDepositMeta` | ComponentType | `undefined` | Custom extra component injected above deposit meta section in the deposit tab panel (e.g., chart, info, etc.) |
160
- > | `Image` | ComponentType<ImageProps> | `<img>` | Component optionally can be used to pass `nextjs` Image component to be used for assets rendering |
161
- > | `LogoSpinner` | ComponentType<SVGProps<SVGElement>> | `<Spinner>` | Component is injected into widget pending transaction overlay. Assume using of spinning animation |
162
- > | `DepositTermsOfUse` | ComponentType | `undefined` | Component is injected into `TermsOfUseOverlay` to extend default terms of use statement points |
163
- > | `ActionButton` | ComponentType | `<ActionButton>` | Component overrides default `ActionButton` and has `ButtonProps` API |
153
+ > | name | type | default value | description |
154
+ > | ------------------- | ----------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
155
+ > | `GeoBlockAlert` | ComponentType | `<GeoBlockAlert>` | Component replaces deposit button while `isGeoBlocked` config param is set to `true` |
156
+ > | `SanctionedAlert` | ComponentType | `<SanctionedAlert>` | Component replaces deposit button while `isSanctioned` config param is set to `true` |
157
+ > | `DepositMetaInfo` | ComponentType | `undefined` | Component is injected into deposit meta part of widget layout nearby TransactionOverviewDisclosure |
158
+ > | `WithdrawMetaInfo` | ComponentType | `undefined` | Component is injected into withdraw meta part of widget layout nearby WithdrawTransactionOverviewDisclosure |
159
+ > | `CustomDepositMeta` | ComponentType | `undefined` | Custom extra component injected above deposit meta section in the deposit tab panel (e.g., chart, info, etc.) |
160
+ > | `Image` | ComponentType<ImageProps> | `<img>` | Component optionally can be used to pass `nextjs` Image component to be used for assets rendering |
161
+ > | `LogoSpinner` | ComponentType<SVGProps<SVGElement>> | `<Spinner>` | Component is injected into widget pending transaction overlay. Assume using of spinning animation |
162
+ > | `DepositTermsOfUse` | ComponentType | `undefined` | Component is injected into `TermsOfUseOverlay` to extend default terms of use statement points |
163
+ > | `ActionButton` | ComponentType | `<ActionButton>` | Component overrides default `ActionButton` and has `ButtonProps` API |
164
164
 
165
165
  ###### Source: `packages/trading-widget/src/trading-widget/providers/component-provider/component-provider.tsx`
166
166
 
@@ -546,10 +546,6 @@ path: `component.meta[name]`
546
546
  > | `proceedWithNextStep` | string | Please proceed with the next step. | |
547
547
  > | `aggregatorsLabel` | string | Swap source | |
548
548
  > | `aggregatorsTooltip` | string | Choose which aggregators to use for your trades. | |
549
- > | `batchTransactionsLabel` | string | Batch transactions | |
550
- > | `batchTransactionsSwitchLabel` | string | Batch | |
551
- > | `batchTransactionsTooltip` | string | Group approve and trade calls into a single batch transaction. Disable if you prefer separate prompts. | |
552
- > | `seamlessOneClickTrading` | string | Seamless one-click trading | |
553
549
 
554
550
  ###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
555
551
 
@@ -4,7 +4,6 @@ export declare const DEFAULT_PRECISION = 18;
4
4
  export declare const EXTENDED_POLLING_INTERVAL = 59000;
5
5
  export declare const DEFAULT_POLLING_INTERVAL = 30000;
6
6
  export declare const SHORTEN_POLLING_INTERVAL = 15000;
7
- export declare const EXTREMELY_SHORT_POLLING_INTERVAL = 5000;
8
7
  export declare const DEFAULT_DEBOUNCE_TIME = 400;
9
8
  export declare const EXTENDED_DEBOUNCE_TIME: number;
10
9
  export declare const DEFAULT_LOCK_TIME: string;
@@ -1,4 +1,3 @@
1
1
  export declare const PYTH_API_LINK = "https://hermes.pyth.network";
2
2
  export declare const FLAT_MONEY_UNIT_LINK = "https://flat.money/flatcoin";
3
3
  export declare const FLAT_MONEY_V1_UNIT_LINK = "https://v1.flat.money/flatcoin";
4
- export declare const EIP5792_LINK = "https://www.eip5792.xyz";
@@ -4,7 +4,7 @@ interface PoolExitRemainingCooldownParams {
4
4
  chainId: ChainId;
5
5
  }
6
6
  export declare const REFETCH_INTERVALS: readonly [readonly [number, 5000], readonly [number, 10000], readonly [number, 20000]];
7
- export declare const getRefetchInterval: (cooldownMs: number) => false | 59000 | 5000 | 10000 | 20000;
7
+ export declare const getRefetchInterval: (cooldownMs: number) => false | 59000 | 10000 | 20000 | 5000;
8
8
  export declare const usePoolDynamicExitRemainingCooldown: ({ address, chainId, }: PoolExitRemainingCooldownParams) => import("wagmi").UseReadContractReturnType<readonly [{
9
9
  readonly inputs: readonly [{
10
10
  readonly internalType: "address";
@@ -10,7 +10,6 @@ export declare const useUpdateTradingSettings: () => (payload: Partial<{
10
10
  isMaxSlippageLoading: boolean;
11
11
  availableAggregators: string[];
12
12
  selectedAggregators: string[];
13
- isBatchTransactionsEnabled: boolean;
14
13
  }>) => void;
15
14
  export declare const useSetTradingType: () => (payload: import("core-kit/types").TradingPanelType) => void;
16
15
  export declare const useUpdateTradingModal: () => (payload: Partial<import("core-kit/types").TradingPanelStateModal>) => void;
@@ -1,4 +1,4 @@
1
- export { useDeposit } from './deposit-transaction/use-deposit';
1
+ export { useDeposit } from './use-deposit';
2
2
  export { useDepositAllowance } from './use-deposit-allowance';
3
3
  export { useDepositQuote } from './use-deposit-quote';
4
4
  export { useDepositQuoteContractRead } from './use-deposit-quote-contract-read';
@@ -1,10 +1,10 @@
1
- export { useTradingResultHandling } from './trade-handlers/use-trading-result-handling';
2
- export { useTradingSettleHandler } from './trade-handlers/use-trading-settle-handler';
1
+ export { useTradingResultHandling } from './use-trading-result-handling';
2
+ export { useTradingSettleHandler } from './use-trading-settle-handler';
3
3
  export { useAssetPrice } from './use-asset-price';
4
4
  export { useRawAssetPrice } from './use-raw-asset-price';
5
5
  export { useIsTradingEnabled } from './use-is-trading-enabled';
6
6
  export { useExchangeRate } from './use-exchange-rate';
7
- export { useHandleTrade } from './trade-handlers/use-handle-trade';
7
+ export { useHandleTrade } from './use-handle-trade';
8
8
  export { useDepositProjectedEarnings } from './projected-earnings/use-deposit-projected-earnings';
9
9
  export { useProjectedEarningsCore } from './projected-earnings/use-projected-earnings-core';
10
10
  export { useSwapDataQuery } from './use-swap-data-query';
@@ -11,4 +11,3 @@ export { useContractReadErrorLogging } from './use-contract-read-error-logging';
11
11
  export { useStaticCallQuery } from './use-static-call-query';
12
12
  export { useInvalidateOnBlock } from './use-invalidate-on-block';
13
13
  export { useInvalidateTradingQueries } from './use-invalidate-trading-queries';
14
- export { useIsBatchContractWritesSupported } from './use-is-batch-contract-writes-supported';
@@ -23,7 +23,6 @@ export interface TradingPanelState {
23
23
  isMaxSlippageLoading: boolean;
24
24
  availableAggregators: string[];
25
25
  selectedAggregators: string[];
26
- isBatchTransactionsEnabled: boolean;
27
26
  };
28
27
  type: TradingPanelType;
29
28
  input: {
@@ -1,4 +1,4 @@
1
- import type { Address, ChainId, Hex } from 'core-kit/types/web3.types';
1
+ import type { Address, ChainId } from 'core-kit/types/web3.types';
2
2
  export interface TradingToken {
3
3
  address: Address;
4
4
  symbol: string;
@@ -14,7 +14,6 @@ export interface PendingTransaction {
14
14
  symbol: string;
15
15
  chainId: ChainId;
16
16
  txHash?: Address;
17
- batchId?: Hex;
18
17
  }
19
18
  type AddTransaction = {
20
19
  type: 'add';