@dhedge/trading-widget 5.0.0 → 5.2.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 (80) hide show
  1. package/README.md +35 -23
  2. package/core-kit/const/network.d.ts +127 -7
  3. package/core-kit/const/storage.d.ts +0 -3
  4. package/core-kit/const/trading.d.ts +2 -0
  5. package/core-kit/hooks/pool/use-available-manager-fee.d.ts +1 -1
  6. package/core-kit/hooks/pool/use-pool-dynamic-exit-remaining-cooldown.d.ts +1 -1
  7. package/core-kit/hooks/pool/use-user-vault-balance.d.ts +1 -1
  8. package/core-kit/hooks/state/action.d.ts +1 -1
  9. package/core-kit/hooks/state/index.d.ts +1 -0
  10. package/core-kit/hooks/state/stepper.d.ts +5 -0
  11. package/core-kit/hooks/trading/allowance/use-approve.d.ts +3 -1
  12. package/core-kit/hooks/trading/allowance/use-can-spend.d.ts +4 -1
  13. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +1 -1
  14. package/core-kit/hooks/trading/index.d.ts +1 -0
  15. package/core-kit/hooks/trading/trade-handlers/use-handle-trade.d.ts +6 -1
  16. package/core-kit/hooks/trading/trade-handlers/use-trading-settle-handler.d.ts +7 -1
  17. package/core-kit/hooks/trading/use-easy-swapper-tracked-assets.d.ts +1 -1
  18. package/core-kit/hooks/trading/withdraw-v2/complete-step/use-auto-send-complete-withdraw-transaction.d.ts +6 -1
  19. package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-transaction.d.ts +3 -1
  20. package/core-kit/hooks/trading/withdraw-v2/complete-step/use-handle-complete-withdraw.d.ts +2 -1
  21. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-allowance.d.ts +7 -1
  22. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction.d.ts +6 -1
  23. package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-unroll-and-claim-transaction.d.ts +5 -1
  24. package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +1 -1
  25. package/core-kit/types/config.types.d.ts +1 -0
  26. package/core-kit/types/state.types.d.ts +8 -3
  27. package/core-kit/types/trading-panel.types.d.ts +7 -0
  28. package/core-kit/utils/formatter.d.ts +1 -0
  29. package/index.cjs +1 -1
  30. package/index.d.ts +2 -2
  31. package/index.js +4122 -3752
  32. package/limit-orders/hooks/use-user-limit-order.d.ts +1 -1
  33. package/package.json +3 -3
  34. package/style.css +1 -1
  35. package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +1 -0
  36. package/trading-widget/components/widget/widget-buttons/add-to-wallet-button/add-to-wallet-button.d.ts +2 -0
  37. package/trading-widget/components/widget/widget-buttons/add-to-wallet-button/add-to-wallet-button.hooks.d.ts +3 -0
  38. package/trading-widget/components/widget/widget-buttons/index.d.ts +3 -0
  39. package/trading-widget/components/widget/widget-buttons/notifications-settings-button/notifications-settings-button.d.ts +3 -0
  40. package/trading-widget/components/widget/widget-buttons/withdraw-stepper-button/withdraw-stepper-button.d.ts +2 -0
  41. package/trading-widget/components/widget/widget-buttons/withdraw-stepper-button/withdraw-stepper-button.hooks.d.ts +4 -0
  42. package/trading-widget/components/widget/widget-input/widget-input.hooks.d.ts +1 -1
  43. package/trading-widget/components/widget/widget-overlay/error-notification-overlay/complete-withdraw-error-overlay.d.ts +7 -0
  44. package/trading-widget/components/widget/widget-overlay/error-notification-overlay/error-notification-overlay.hooks.d.ts +1 -0
  45. package/trading-widget/components/widget/widget-overlay/index.d.ts +1 -1
  46. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +1 -0
  47. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +1 -0
  48. package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.d.ts +3 -0
  49. package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.hooks.d.ts +9 -0
  50. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/approve-step.d.ts +3 -0
  51. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/approve-step.hooks.d.ts +10 -0
  52. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/complete-withdraw-step.d.ts +3 -0
  53. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/complete-withdraw-step.hooks.d.ts +10 -0
  54. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/init-withdraw-step.d.ts +3 -0
  55. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/init-withdraw-step.hooks.d.ts +13 -0
  56. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/step-item.d.ts +9 -0
  57. package/trading-widget/components/widget/widget-overlay/{fmp-withdrawal-overlay/fmp-withdrawal-overlay.d.ts → withdraw-stepper-overlay/withdraw-stepper-overlay.d.ts} +1 -1
  58. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-stepper-overlay.hooks.d.ts +14 -0
  59. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-steps.d.ts +11 -0
  60. package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +1 -2
  61. package/trading-widget/hooks/index.d.ts +3 -0
  62. package/trading-widget/hooks/use-display-limit-sell-overlay.d.ts +1 -0
  63. package/trading-widget/hooks/use-step-description.d.ts +1 -0
  64. package/trading-widget/hooks/use-transaction-status-label.d.ts +5 -0
  65. package/trading-widget/providers/component-provider/component-provider.d.ts +1 -0
  66. package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +1 -0
  67. package/trading-widget/providers/component-provider/component-provider.types.d.ts +5 -0
  68. package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
  69. package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +6 -0
  70. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +13 -7
  71. package/trading-widget/types/overlay.types.d.ts +1 -1
  72. package/trading-widget/types/theme.types.d.ts +1 -1
  73. package/trading-widget/components/widget/widget-overlay/fmp-withdrawal-overlay/fmp-withdrawal-overlay.hooks.d.ts +0 -10
  74. package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.d.ts +0 -2
  75. package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.hooks.d.ts +0 -6
  76. package/trading-widget/components/withdraw/complete-step/complete-step.hooks.d.ts +0 -3
  77. package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.d.ts +0 -2
  78. package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.hooks.d.ts +0 -6
  79. package/trading-widget/components/withdraw/stepper/withdraw-stepper.d.ts +0 -2
  80. package/trading-widget/components/withdraw/stepper/withdraw-stepper.hooks.d.ts +0 -8
package/README.md CHANGED
@@ -9,8 +9,8 @@ Widget library has some vital `peerDependencies` as a core tool stack. Make sure
9
9
  ```bash
10
10
  "@tanstack/react-query": "^5.28.4",
11
11
  "react": ">=18.2.0",
12
- "viem": "^2.8.14",
13
- "wagmi": "^2.5.11"
12
+ "viem": "^2.44.2",
13
+ "wagmi": "^2.19.5"
14
14
  ```
15
15
 
16
16
  1. Installation:
@@ -117,6 +117,7 @@ Top level provider component. Headless part of trading logic. API handles params
117
117
  > | `maintenance` | `boolean` | `false` | Enables global vault maintenance mode (blocks deposits & withdrawals) |
118
118
  > | `maintenanceDeposits` | `boolean` | `false` | Blocks only deposits |
119
119
  > | `maintenanceWithdrawals` | `boolean` | `false` | Blocks only withdrawals |
120
+ > | `depositCapacity` | `number` | `undefined` | Maximum deposit capacity in USD. If set, deposits exceeding this value will be blocked |
120
121
  > | `pricingAsset` | `{ address: Address; symbol: string }` | `undefined` | Pricing asset used for limit orders |
121
122
 
122
123
  ###### Source: `packages/trading-widget/src/core-kit/types/config.types.ts`
@@ -157,10 +158,11 @@ UI configuration provider. Manages params to configure custom styling, component
157
158
 
158
159
  ##### actions
159
160
 
160
- > | name | type | default value | description |
161
- > | -------------------- | ------------------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
162
- > | `onConnect` | `() => void` | `() => {}` | Widget has built-in `Connect Wallet` action button that triggers `onConnect` callback assuming starting of abstract wallet connection process. After all the only requirement is to get connected wallet inside wagmi's `useAccount` hook to make trading operations possible |
163
- > | `onAcceptTermsOfUse` | `() => Promise<boolean>` | `() => Promise.resolve(true)` | Callback is triggered after user's approval of Terms of Use statements assuming switching of external `config.termsOfUseAccepted` param to `true` state |
161
+ > | name | type | default value | description |
162
+ > | ----------------------------- | ------------------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
163
+ > | `onConnect` | `() => void` | `() => {}` | Widget has built-in `Connect Wallet` action button that triggers `onConnect` callback assuming starting of abstract wallet connection process. After all the only requirement is to get connected wallet inside wagmi's `useAccount` hook to make trading operations possible |
164
+ > | `onAcceptTermsOfUse` | `() => Promise<boolean>` | `() => Promise.resolve(true)` | Callback is triggered after user's approval of Terms of Use statements assuming switching of external `config.termsOfUseAccepted` param to `true` state |
165
+ > | `onOpenNotificationsSettings` | `() => void` | `undefined` | Optional callback to open notifications settings modal. |
164
166
 
165
167
  ###### Source: `packages/trading-widget/src/trading-widget/providers/config-provider`
166
168
 
@@ -175,18 +177,19 @@ UI configuration provider. Manages params to configure custom styling, component
175
177
  <code>Custom components to be injected into widget layout</code>
176
178
  </summary>
177
179
 
178
- > | name | type | default value | description |
179
- > | ----------------------- | ----------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
180
- > | `GeoBlockAlert` | ComponentType | `<GeoBlockAlert>` | Component replaces deposit button while `isGeoBlocked` config param is set to `true` |
181
- > | `SanctionedAlert` | ComponentType | `<SanctionedAlert>` | Component replaces deposit button while `isSanctioned` config param is set to `true` |
182
- > | `MaxSupplyReachedAlert` | ComponentType | `<MaxSupplyReachedAlert>` | Component rendered in the deposit meta when the expected total supply exceeds the max cap; warns that the deposit will not go through |
183
- > | `DepositMetaInfo` | ComponentType | `undefined` | Component is injected into deposit meta part of widget layout nearby TransactionOverviewDisclosure |
184
- > | `WithdrawMetaInfo` | ComponentType | `undefined` | Component is injected into withdraw meta part of widget layout nearby WithdrawTransactionOverviewDisclosure |
185
- > | `CustomDepositMeta` | ComponentType | `undefined` | Custom extra component injected above deposit meta section in the deposit tab panel (e.g., chart, info, etc.) |
186
- > | `Image` | ComponentType<ImageProps> | `<img>` | Component optionally can be used to pass `nextjs` Image component to be used for assets rendering |
187
- > | `LogoSpinner` | ComponentType<SVGProps<SVGElement>> | `<Spinner>` | Component is injected into widget pending transaction overlay. Assume using of spinning animation |
188
- > | `DepositTermsOfUse` | ComponentType | `undefined` | Component is injected into `TermsOfUseOverlay` to extend default terms of use statement points |
189
- > | `ActionButton` | ComponentType | `<ActionButton>` | Component overrides default `ActionButton` and has `ButtonProps` API |
180
+ > | name | type | default value | description |
181
+ > | ----------------------- | ---------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
182
+ > | `GeoBlockAlert` | ComponentType | `<GeoBlockAlert>` | Component replaces deposit button while `isGeoBlocked` config param is set to `true` |
183
+ > | `SanctionedAlert` | ComponentType | `<SanctionedAlert>` | Component replaces deposit button while `isSanctioned` config param is set to `true` |
184
+ > | `MaxSupplyReachedAlert` | ComponentType | `<MaxSupplyReachedAlert>` | Component rendered in the deposit meta when the expected total supply exceeds the max cap; warns that the deposit will not go through |
185
+ > | `DepositMetaInfo` | ComponentType | `undefined` | Component is injected into deposit meta part of widget layout nearby TransactionOverviewDisclosure |
186
+ > | `WithdrawMetaInfo` | ComponentType | `undefined` | Component is injected into withdraw meta part of widget layout nearby WithdrawTransactionOverviewDisclosure |
187
+ > | `CustomDepositMeta` | ComponentType | `undefined` | Custom extra component injected above deposit meta section in the deposit tab panel (e.g., chart, info, etc.) |
188
+ > | `Image` | ComponentType<ImageProps> | `<img>` | Component optionally can be used to pass `nextjs` Image component to be used for assets rendering |
189
+ > | `LogoSpinner` | ComponentType<SVGProps<SVGElement>> | `<Spinner>` | Component is injected into widget pending transaction overlay. Assume using of spinning animation |
190
+ > | `DepositTermsOfUse` | ComponentType | `undefined` | Component is injected into `TermsOfUseOverlay` to extend default terms of use statement points |
191
+ > | `ActionButton` | ComponentType | `<ActionButton>` | Component overrides default `ActionButton` and has `ButtonProps` API |
192
+ > | `BecomeReferrerButton` | ComponentType<BecomeReferrerButtonProps> | `undefined` | Component is rendered at the top of the action buttons in the success deposit overlay. Receives `vaultAddress` prop |
190
193
 
191
194
  ###### Source: `packages/trading-widget/src/trading-widget/providers/component-provider/component-provider.tsx`
192
195
 
@@ -231,6 +234,7 @@ path: `global.color[name]`
231
234
  > | `colorTextSuccess` | string | `#73D393` | Success text color |
232
235
  > | `colorIcon` | string | `global?.color?.colorTextPrimary ?? #ffffff` | Icon color |
233
236
  > | `colorIconHover` | string | `global?.color?.colorIconHover ?? #ffffffCC` | Icon hover color |
237
+ > | `colorErrorOverlayIcon` | string | `var(--panel-accent-from-color)` | Error overlay icon color |
234
238
  > | `colorScrollbar` | string | `#73D39380` | Scrollbar color |
235
239
 
236
240
  ###### size
@@ -292,6 +296,14 @@ path: `component.popup[name]`
292
296
  > | `color.colorBorder` | string | `config?.global?.color?.colorTextSecondary ?? #9DA2AD` | Popup bg color |
293
297
  > | `size.fontSize` | string | `config?.global?.size?.fontSizeXs ?? 12px` | Popup font size |
294
298
 
299
+ ###### overlay
300
+
301
+ path: `component.overlay[name]`
302
+
303
+ > | name | type | default value | description |
304
+ > | --------------- | ------ | ----------------------------------------------------- | ---------------- |
305
+ > | `color.colorBg` | string | `config?.component?.popup?.color?.colorBg ?? #2B313E` | Overlay bg color |
306
+
295
307
  ###### popupList
296
308
 
297
309
  path: `component.popupList[name]`
@@ -517,6 +529,7 @@ path: `component.meta[name]`
517
529
  > | `allAssets` | string | All Assets | |
518
530
  > | `all` | string | All | |
519
531
  > | `sell` | string | Sell | |
532
+ > | `sellNow` | string | Sell now | |
520
533
  > | `receiveEstimated` | string | Receive (estimated) | |
521
534
  > | `confirmInWallet` | string | Please confirm in wallet | |
522
535
  > | `pending` | string | Pending... | |
@@ -525,6 +538,7 @@ path: `component.meta[name]`
525
538
  > | `minimumPurchase` | string | Minimum purchase is {value} | |
526
539
  > | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
527
540
  > | `poolDepositsAreMaintenance` | string | {poolSymbol} token is under maintenance. Deposits are temporarily blocked. | |
541
+ > | `exceedsDepositCapacity` | string | Deposit amount exceeds available {poolSymbol} deposit capacity. | |
528
542
  > | `poolWithdrawalsAreMaintenance` | string | {poolSymbol} token is under maintenance. Withdrawals are temporarily blocked. | |
529
543
  > | `poolIsPrivate` | string | This vault is currently private | |
530
544
  > | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
@@ -568,11 +582,6 @@ path: `component.meta[name]`
568
582
  > | `claimLabel` | string | Claim Assets | |
569
583
  > | `createLimitSellOrder` | string | Stop order set | |
570
584
  > | `swapAndClaimTo` | string | Swap and claim assets to | |
571
- > | `initWithdrawDescription` | string | Unroll | |
572
- > | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
573
- > | `completeWithdrawDescription` | string | Claim | |
574
- > | `completeWithdrawTooltip` | string | This final step swaps all assets to a single asset and sends it to your wallet | |
575
- > | `unrollAndClaimDescription` | string | Claim | |
576
585
  > | `limitOrderWithdrawDescription` | string | You are about to create a withdrawal request. Your vault tokens will be withdrawn within a few minutes. | |
577
586
  > | `total` | string | Total: | |
578
587
  > | `showAll` | string | Show All | |
@@ -585,6 +594,8 @@ path: `component.meta[name]`
585
594
  > | `batchTransactionsSwitchLabel` | string | Batch | |
586
595
  > | `batchTransactionsTooltip` | string | Group approve and trade calls into a single batch transaction. Disable if you prefer separate prompts. | |
587
596
  > | `openLimitOrderAfterBuySwitchLabel` | string | Add Stop Order | |
597
+ > | `openNotificationsSettingsLabel` | string | Enable alerts | |
598
+ > | `addToWallet` | string | add to wallet | |
588
599
  > | `orderingLabel` | string | Ordering | |
589
600
  > | `paidLabel` | string | Paid | |
590
601
  > | `priceLabel` | string | Price | |
@@ -597,6 +608,7 @@ path: `component.meta[name]`
597
608
  > | `deleteWithdrawalRequest` | string | Delete withdrawal request | |
598
609
  > | `insufficientBalance` | string | Insufficient Balance | |
599
610
  > | `expectToReceiveUsdcSoon` | string | Expect to receive your USDC over the next few minutes | |
611
+ > | `cancel` | string | Cancel | |
600
612
 
601
613
  ###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
602
614
 
@@ -37,16 +37,40 @@ export declare const CHAIN_MAP: {
37
37
  sourceId?: number | undefined;
38
38
  testnet?: boolean | undefined;
39
39
  custom?: Record<string, unknown> | undefined;
40
+ extendSchema?: Record<string, unknown> | undefined;
40
41
  fees?: import("viem").ChainFees<undefined> | undefined;
41
42
  formatters?: undefined;
43
+ prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
44
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
45
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
46
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
47
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | undefined, options: {
48
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
49
+ }] | undefined;
42
50
  serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
51
+ verifyHash?: ((client: import('../types').Client<import("viem").Transport, import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, undefined, {
52
+ [x: string]: unknown;
53
+ account?: undefined;
54
+ batch?: undefined;
55
+ cacheTime?: undefined;
56
+ ccipRead?: undefined;
57
+ chain?: undefined;
58
+ experimental_blockTag?: undefined;
59
+ key?: undefined;
60
+ name?: undefined;
61
+ pollingInterval?: undefined;
62
+ request?: undefined;
63
+ transport?: undefined;
64
+ type?: undefined;
65
+ uid?: undefined;
66
+ } | undefined>, parameters: import("viem").VerifyHashActionParameters) => Promise<boolean>) | undefined;
43
67
  };
44
68
  readonly 137: {
45
69
  blockExplorers: {
46
70
  readonly default: {
47
71
  readonly name: "PolygonScan";
48
72
  readonly url: "https://polygonscan.com";
49
- readonly apiUrl: "https://api.polygonscan.com/api";
73
+ readonly apiUrl: "https://api.etherscan.io/v2/api";
50
74
  };
51
75
  };
52
76
  blockTime: 2000;
@@ -73,9 +97,33 @@ export declare const CHAIN_MAP: {
73
97
  sourceId?: number | undefined;
74
98
  testnet?: boolean | undefined;
75
99
  custom?: Record<string, unknown> | undefined;
100
+ extendSchema?: Record<string, unknown> | undefined;
76
101
  fees?: import("viem").ChainFees<undefined> | undefined;
77
102
  formatters?: undefined;
103
+ prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
104
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
105
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
106
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
107
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | undefined, options: {
108
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
109
+ }] | undefined;
78
110
  serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
111
+ verifyHash?: ((client: import('../types').Client<import("viem").Transport, import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, undefined, {
112
+ [x: string]: unknown;
113
+ account?: undefined;
114
+ batch?: undefined;
115
+ cacheTime?: undefined;
116
+ ccipRead?: undefined;
117
+ chain?: undefined;
118
+ experimental_blockTag?: undefined;
119
+ key?: undefined;
120
+ name?: undefined;
121
+ pollingInterval?: undefined;
122
+ request?: undefined;
123
+ transport?: undefined;
124
+ type?: undefined;
125
+ uid?: undefined;
126
+ } | undefined>, parameters: import("viem").VerifyHashActionParameters) => Promise<boolean>) | undefined;
79
127
  };
80
128
  readonly 10: {
81
129
  blockExplorers: {
@@ -147,6 +195,7 @@ export declare const CHAIN_MAP: {
147
195
  sourceId: 1;
148
196
  testnet?: boolean | undefined;
149
197
  custom?: Record<string, unknown> | undefined;
198
+ extendSchema?: Record<string, unknown> | undefined;
150
199
  fees?: import("viem").ChainFees<undefined> | undefined;
151
200
  formatters: {
152
201
  readonly block: {
@@ -212,16 +261,16 @@ export declare const CHAIN_MAP: {
212
261
  r: `0x${string}`;
213
262
  s: `0x${string}`;
214
263
  v: bigint;
215
- value: bigint;
216
- gas: bigint;
217
264
  to: `0x${string}` | null;
218
265
  from: `0x${string}`;
266
+ gas: bigint;
219
267
  nonce: number;
268
+ value: bigint;
220
269
  blockHash: `0x${string}` | null;
221
270
  blockNumber: bigint | null;
222
- transactionIndex: number | null;
223
271
  hash: `0x${string}`;
224
272
  input: `0x${string}`;
273
+ transactionIndex: number | null;
225
274
  typeHex: `0x${string}` | null;
226
275
  accessList?: undefined;
227
276
  authorizationList?: undefined;
@@ -379,9 +428,32 @@ export declare const CHAIN_MAP: {
379
428
  type: "transactionReceipt";
380
429
  };
381
430
  };
431
+ prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
432
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
433
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
434
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
435
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | undefined, options: {
436
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
437
+ }] | undefined;
382
438
  serializers: {
383
439
  readonly transaction: typeof import("wagmi/chains").serializeTransactionOpStack;
384
440
  };
441
+ verifyHash?: ((client: import('../types').Client<import("viem").Transport, import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, undefined, {
442
+ [x: string]: unknown;
443
+ account?: undefined;
444
+ batch?: undefined;
445
+ cacheTime?: undefined;
446
+ ccipRead?: undefined;
447
+ chain?: undefined;
448
+ experimental_blockTag?: undefined;
449
+ key?: undefined;
450
+ name?: undefined;
451
+ pollingInterval?: undefined;
452
+ request?: undefined;
453
+ transport?: undefined;
454
+ type?: undefined;
455
+ uid?: undefined;
456
+ } | undefined>, parameters: import("viem").VerifyHashActionParameters) => Promise<boolean>) | undefined;
385
457
  };
386
458
  readonly 42161: {
387
459
  blockExplorers: {
@@ -415,9 +487,33 @@ export declare const CHAIN_MAP: {
415
487
  sourceId?: number | undefined;
416
488
  testnet?: boolean | undefined;
417
489
  custom?: Record<string, unknown> | undefined;
490
+ extendSchema?: Record<string, unknown> | undefined;
418
491
  fees?: import("viem").ChainFees<undefined> | undefined;
419
492
  formatters?: undefined;
493
+ prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
494
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
495
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
496
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
497
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | undefined, options: {
498
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
499
+ }] | undefined;
420
500
  serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
501
+ verifyHash?: ((client: import('../types').Client<import("viem").Transport, import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, undefined, {
502
+ [x: string]: unknown;
503
+ account?: undefined;
504
+ batch?: undefined;
505
+ cacheTime?: undefined;
506
+ ccipRead?: undefined;
507
+ chain?: undefined;
508
+ experimental_blockTag?: undefined;
509
+ key?: undefined;
510
+ name?: undefined;
511
+ pollingInterval?: undefined;
512
+ request?: undefined;
513
+ transport?: undefined;
514
+ type?: undefined;
515
+ uid?: undefined;
516
+ } | undefined>, parameters: import("viem").VerifyHashActionParameters) => Promise<boolean>) | undefined;
421
517
  };
422
518
  readonly 8453: {
423
519
  blockExplorers: {
@@ -491,6 +587,7 @@ export declare const CHAIN_MAP: {
491
587
  sourceId: 1;
492
588
  testnet?: boolean | undefined;
493
589
  custom?: Record<string, unknown> | undefined;
590
+ extendSchema?: Record<string, unknown> | undefined;
494
591
  fees?: import("viem").ChainFees<undefined> | undefined;
495
592
  formatters: {
496
593
  readonly block: {
@@ -556,16 +653,16 @@ export declare const CHAIN_MAP: {
556
653
  r: `0x${string}`;
557
654
  s: `0x${string}`;
558
655
  v: bigint;
559
- value: bigint;
560
- gas: bigint;
561
656
  to: `0x${string}` | null;
562
657
  from: `0x${string}`;
658
+ gas: bigint;
563
659
  nonce: number;
660
+ value: bigint;
564
661
  blockHash: `0x${string}` | null;
565
662
  blockNumber: bigint | null;
566
- transactionIndex: number | null;
567
663
  hash: `0x${string}`;
568
664
  input: `0x${string}`;
665
+ transactionIndex: number | null;
569
666
  typeHex: `0x${string}` | null;
570
667
  accessList?: undefined;
571
668
  authorizationList?: undefined;
@@ -723,9 +820,32 @@ export declare const CHAIN_MAP: {
723
820
  type: "transactionReceipt";
724
821
  };
725
822
  };
823
+ prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
824
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
825
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>, options: {
826
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
827
+ }) => Promise<import("viem").PrepareTransactionRequestParameters<import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, import("wagmi/chains").Chain | undefined, `0x${string}` | import("viem").Account | undefined, import("viem").PrepareTransactionRequestRequest<import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined, import("wagmi/chains").Chain | undefined>>>) | undefined, options: {
828
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
829
+ }] | undefined;
726
830
  serializers: {
727
831
  readonly transaction: typeof import("wagmi/chains").serializeTransactionOpStack;
728
832
  };
833
+ verifyHash?: ((client: import('../types').Client<import("viem").Transport, import("wagmi/chains").Chain | undefined, import("viem").Account | undefined, undefined, {
834
+ [x: string]: unknown;
835
+ account?: undefined;
836
+ batch?: undefined;
837
+ cacheTime?: undefined;
838
+ ccipRead?: undefined;
839
+ chain?: undefined;
840
+ experimental_blockTag?: undefined;
841
+ key?: undefined;
842
+ name?: undefined;
843
+ pollingInterval?: undefined;
844
+ request?: undefined;
845
+ transport?: undefined;
846
+ type?: undefined;
847
+ uid?: undefined;
848
+ } | undefined>, parameters: import("viem").VerifyHashActionParameters) => Promise<boolean>) | undefined;
729
849
  };
730
850
  };
731
851
  export declare const CHAIN_NATIVE_TOKENS: ChainNativeTokenMap;
@@ -3,6 +3,3 @@ export declare const LOCAL_STORAGE_KEYS: {
3
3
  readonly REFERRER: "referrer";
4
4
  readonly REF_POOL: "ref_pool";
5
5
  };
6
- export declare const SESSION_STORAGE_KEYS: {
7
- readonly AUTO_COMPLETE_WITHDRAW: "auto-complete-withdraw";
8
- };
@@ -1,3 +1,4 @@
1
+ import type { TransactionAction } from '../types';
1
2
  export declare const EASY_SWAPPER_V2_DEPOSIT_METHODS: {
2
3
  DEPOSIT: "deposit";
3
4
  DEPOSIT_CUSTOM: "depositWithCustomCooldown";
@@ -8,3 +9,4 @@ export declare const EASY_SWAPPER_V2_DEPOSIT_METHODS: {
8
9
  ZAP_DEPOSIT: "zapDeposit";
9
10
  ZAP_DEPOSIT_CUSTOM: "zapDepositWithCustomCooldown";
10
11
  };
12
+ export declare const COMPLETE_WITHDRAW_ACTIONS: TransactionAction[];
@@ -270,5 +270,5 @@ export declare const useAvailableManagerFee: <T = number>({ address, chainId, se
270
270
  readonly outputs: readonly [];
271
271
  readonly stateMutability: "nonpayable";
272
272
  readonly type: "function";
273
- }], "calculateAvailableManagerFee", [bigint], T>;
273
+ }], "calculateAvailableManagerFee", readonly [bigint], T>;
274
274
  export {};
@@ -271,5 +271,5 @@ export declare const usePoolDynamicExitRemainingCooldown: ({ address, chainId, }
271
271
  readonly outputs: readonly [];
272
272
  readonly stateMutability: "nonpayable";
273
273
  readonly type: "function";
274
- }], "getExitRemainingCooldown", [`0x${string}`], number>;
274
+ }], "getExitRemainingCooldown", readonly [sender: `0x${string}`], number>;
275
275
  export {};
@@ -265,4 +265,4 @@ export declare const useUserVaultBalance: ({ account, chainId, address, }: PoolC
265
265
  readonly outputs: readonly [];
266
266
  readonly stateMutability: "nonpayable";
267
267
  readonly type: "function";
268
- }], "balanceOf", [`0x${string}`], import("@shared/types").Balance>;
268
+ }], "balanceOf", readonly [account: `0x${string}`], import("@shared/types").Balance>;
@@ -27,6 +27,6 @@ export declare const useGetSwapQuotes: () => ({ signal, variables, }: {
27
27
  signal: AbortSignal;
28
28
  variables: SwapDataRequest;
29
29
  }) => Promise<import("@shared/types").SwapDataResponse[] | null>;
30
- export declare const useUpdatePoolConfig: () => (payload: Record<`0x${string}`, Pick<import("../../types").PoolConfig, "maintenance" | "maintenanceDeposits" | "maintenanceWithdrawals">>) => void;
30
+ export declare const useUpdatePoolConfig: () => (payload: Record<`0x${string}`, Pick<import("../../types").PoolConfig, "maintenance" | "maintenanceDeposits" | "maintenanceWithdrawals" | "depositCapacity">>) => void;
31
31
  export declare const useAddPoolConfig: () => (payload: import("../../types").PoolConfig) => void;
32
32
  export declare const useUpdateCustomDepositTokensPerChain: () => (payload: Record<number, import("@shared/types").TradingToken[]>) => void;
@@ -3,6 +3,7 @@ export { useTradingPanelPoolAddress, useTradingPanelPoolConfig, useTradingPanelP
3
3
  export { useSendTokenInput, useReceiveTokenInput, } from '../../hooks/state/input';
4
4
  export { useTradingPanelSettings, useCustomDepositTokensPerChain, } from '../../hooks/state/settings';
5
5
  export { useTradingPanelModal } from '../../hooks/state/modal';
6
+ export { useTradingPanelStepper } from '../../hooks/state/stepper';
6
7
  export { useTradingPanelType, useIsDepositTradingPanelType, } from '../../hooks/state/type';
7
8
  export { useTradingPanelTransactions } from '../../hooks/state/transaction';
8
9
  export { useTradingPanelActions, useTradingPanelState, } from '../../hooks/state/context';
@@ -0,0 +1,5 @@
1
+ import type { TradingPanelActionsState, TradingPanelState } from '../../types/state.types';
2
+ export declare const useTradingPanelStepper: () => [
3
+ TradingPanelState['stepper'],
4
+ TradingPanelActionsState['updateStepper']
5
+ ];
@@ -1,9 +1,11 @@
1
1
  import type { TradingToken } from '@shared/types';
2
+ import type { OnTradingSettleErrorCallback } from '../../../hooks/trading/trade-handlers/use-trading-settle-handler';
2
3
  import type { Address } from '../../../types/web3.types';
3
4
  interface UseApproveParams {
4
5
  token: TradingToken;
5
6
  rawTokenAmount: string;
6
7
  spenderAddress: Address;
8
+ onErrorCallback?: OnTradingSettleErrorCallback;
7
9
  }
8
- export declare const useApprove: ({ token, rawTokenAmount, spenderAddress, }: UseApproveParams) => () => Promise<void>;
10
+ export declare const useApprove: ({ token, rawTokenAmount, spenderAddress, onErrorCallback, }: UseApproveParams) => () => Promise<void>;
9
11
  export {};
@@ -7,5 +7,8 @@ interface UseCanSpendParams {
7
7
  chainId: ChainId;
8
8
  skip?: boolean;
9
9
  }
10
- export declare const useCanSpend: ({ rawAmountToSpend, tokenAddress, ownerAddress, spenderAddress, chainId, skip, }: UseCanSpendParams) => boolean;
10
+ export declare const useCanSpend: ({ rawAmountToSpend, tokenAddress, ownerAddress, spenderAddress, chainId, skip, }: UseCanSpendParams) => {
11
+ canSpend: boolean;
12
+ isFetching: boolean;
13
+ };
11
14
  export {};
@@ -1175,4 +1175,4 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
1175
1175
  readonly outputs: readonly [];
1176
1176
  readonly stateMutability: "payable";
1177
1177
  readonly type: "function";
1178
- }], "depositQuote", [`0x${string}`, `0x${string}`, bigint], bigint>;
1178
+ }], "depositQuote", readonly [`0x${string}`, `0x${string}`, bigint], bigint>;
@@ -1,5 +1,6 @@
1
1
  export { useTradingResultHandling } from '../../hooks/trading/trade-handlers/use-trading-result-handling';
2
2
  export { useTradingSettleHandler } from '../../hooks/trading/trade-handlers/use-trading-settle-handler';
3
+ export type { OnTradingSettleErrorCallback } from '../../hooks/trading/trade-handlers/use-trading-settle-handler';
3
4
  export { useAssetPrice } from '../../hooks/trading/use-asset-price';
4
5
  export { useRawAssetPrice } from '../../hooks/trading/use-raw-asset-price';
5
6
  export { useIsTradingEnabled } from '../../hooks/trading/use-is-trading-enabled';
@@ -1,6 +1,11 @@
1
1
  import type { ContractActionFunc } from '../../../types/web3.types';
2
- export declare const useHandleTrade: (trade: ContractActionFunc) => {
2
+ interface UseHandleTradeParams {
3
+ trade: ContractActionFunc;
4
+ onErrorCallback?: () => void;
5
+ }
6
+ export declare const useHandleTrade: ({ trade, onErrorCallback, }: UseHandleTradeParams) => {
3
7
  disabled: boolean;
4
8
  label: string;
5
9
  handleTrade: () => Promise<void>;
6
10
  };
11
+ export {};
@@ -1,3 +1,9 @@
1
1
  import type { PendingTransaction } from '../../../types/trading-panel.types';
2
2
  import type { UseWriteContractParameters } from '../../../types/web3.types';
3
- export declare const useTradingSettleHandler: (action: PendingTransaction['action']) => Required<Required<UseWriteContractParameters>['mutation']>['onSettled'];
3
+ export type OnTradingSettleErrorCallback = (error: Error) => void;
4
+ interface UseTradingSettleHandlerParams {
5
+ action: PendingTransaction['action'];
6
+ onErrorCallback?: OnTradingSettleErrorCallback;
7
+ }
8
+ export declare const useTradingSettleHandler: ({ action, onErrorCallback, }: UseTradingSettleHandlerParams) => Required<Required<UseWriteContractParameters>['mutation']>['onSettled'];
9
+ export {};
@@ -1175,7 +1175,7 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
1175
1175
  readonly outputs: readonly [];
1176
1176
  readonly stateMutability: "payable";
1177
1177
  readonly type: "function";
1178
- }], "getTrackedAssets", [`0x${string}`], readonly {
1178
+ }], "getTrackedAssets", readonly [_depositor: `0x${string}`], readonly {
1179
1179
  token: `0x${string}`;
1180
1180
  balance: bigint;
1181
1181
  }[]>;
@@ -1 +1,6 @@
1
- export declare const useAutoSendCompleteWithdrawTransaction: (handleTrade: () => Promise<void>) => void;
1
+ interface UseAutoSendCompleteWithdrawTransactionParams {
2
+ handleTrade: () => Promise<void>;
3
+ onError: () => void;
4
+ }
5
+ export declare const useAutoSendCompleteWithdrawTransaction: ({ handleTrade, onError, }: UseAutoSendCompleteWithdrawTransactionParams) => void;
6
+ export {};
@@ -1,6 +1,8 @@
1
+ import type { OnTradingSettleErrorCallback } from '../../../../hooks/trading';
1
2
  import type { ContractActionFunc } from '../../../../types/web3.types';
2
3
  interface UseWithdrawSwapTransactionProps {
3
4
  isClaim?: boolean;
5
+ onErrorCallback?: OnTradingSettleErrorCallback;
4
6
  }
5
- export declare const useCompleteWithdrawTransaction: ({ isClaim, }?: UseWithdrawSwapTransactionProps | undefined) => ContractActionFunc;
7
+ export declare const useCompleteWithdrawTransaction: ({ isClaim, onErrorCallback, }?: UseWithdrawSwapTransactionProps | undefined) => ContractActionFunc;
6
8
  export {};
@@ -2,8 +2,9 @@ import type { ContractActionFunc } from '../../../../types/web3.types';
2
2
  interface UseHandleWithdrawSwapProps {
3
3
  withdraw: ContractActionFunc;
4
4
  isClaim?: boolean;
5
+ onErrorCallback?: () => void;
5
6
  }
6
- export declare const useHandleCompleteWithdraw: ({ withdraw, isClaim, }: UseHandleWithdrawSwapProps) => {
7
+ export declare const useHandleCompleteWithdraw: ({ withdraw, isClaim, onErrorCallback, }: UseHandleWithdrawSwapProps) => {
7
8
  disabled: boolean;
8
9
  label: string;
9
10
  handleTrade: () => Promise<void>;
@@ -1,4 +1,10 @@
1
- export declare const useInitWithdrawAllowance: () => {
1
+ import type { OnTradingSettleErrorCallback } from '../../../../hooks/trading';
2
+ interface UseInitWithdrawAllowanceParams {
3
+ onErrorCallback?: OnTradingSettleErrorCallback;
4
+ }
5
+ export declare const useInitWithdrawAllowance: ({ onErrorCallback, }?: UseInitWithdrawAllowanceParams | undefined) => {
2
6
  canSpend: boolean;
3
7
  approve: () => Promise<void>;
8
+ isCanSpendFetching: boolean;
4
9
  };
10
+ export {};
@@ -1,6 +1,11 @@
1
+ import { type OnTradingSettleErrorCallback } from '../../../../hooks/trading';
1
2
  import type { TransactionAction } from '../../../../types';
2
3
  import type { ContractActionFunc } from '../../../../types/web3.types';
3
- export declare const useInitWithdrawTransaction: () => {
4
+ interface UseInitiateWithdrawTransactionParams {
5
+ onErrorCallback?: OnTradingSettleErrorCallback;
6
+ }
7
+ export declare const useInitWithdrawTransaction: ({ onErrorCallback, }?: UseInitiateWithdrawTransactionParams | undefined) => {
4
8
  withdraw: ContractActionFunc;
5
9
  action: TransactionAction;
6
10
  };
11
+ export {};
@@ -1 +1,5 @@
1
- export declare const useIsUnrollAndClaimTransaction: () => boolean;
1
+ export declare const useIsUnrollAndClaimTransaction: () => {
2
+ isUnrollAndClaimTransaction: boolean;
3
+ isFetching: boolean;
4
+ isFetched: boolean;
5
+ };