@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
@@ -34,7 +34,7 @@ export type TranslationMap = {
34
34
  allAssets: string;
35
35
  all: string;
36
36
  sell: string;
37
- receiveEstimated: string;
37
+ sellNow: string;
38
38
  confirmInWallet: string;
39
39
  pending: string;
40
40
  approve: string;
@@ -43,6 +43,7 @@ export type TranslationMap = {
43
43
  poolIsInactive: string;
44
44
  poolIsPrivate: string;
45
45
  poolDepositsAreMaintenance: string;
46
+ exceedsDepositCapacity: string;
46
47
  poolWithdrawalsAreMaintenance: string;
47
48
  confirmMaxSlippage: string;
48
49
  withdrawalLiquidityDisabled: string;
@@ -87,13 +88,10 @@ export type TranslationMap = {
87
88
  swapAndClaimTo: string;
88
89
  orderingLabel: string;
89
90
  paidLabel: string;
91
+ soldLabel: string;
92
+ receivedLabel: string;
90
93
  priceLabel: string;
91
94
  transactionLabel: string;
92
- initWithdrawDescription: string;
93
- initWithdrawTooltip: string;
94
- completeWithdrawDescription: string;
95
- completeWithdrawTooltip: string;
96
- unrollAndClaimDescription: string;
97
95
  limitOrderWithdrawDescription: string;
98
96
  total: string;
99
97
  showAll: string;
@@ -106,8 +104,9 @@ export type TranslationMap = {
106
104
  batchTransactionsSwitchLabel: string;
107
105
  batchTransactionsTooltip: string;
108
106
  openLimitOrderAfterBuySwitchLabel: string;
107
+ openNotificationsSettingsLabel: string;
108
+ addToWallet: string;
109
109
  stopOrder: string;
110
- send: string;
111
110
  rate: string;
112
111
  exchangeRate: string;
113
112
  cooldown: string;
@@ -116,6 +115,13 @@ export type TranslationMap = {
116
115
  deleteWithdrawalRequest: string;
117
116
  insufficientBalance: string;
118
117
  expectToReceiveUsdcSoon: string;
118
+ estimated: string;
119
+ cancel: string;
120
+ approveTokensForWithdrawal: string;
121
+ unrollAssetsToPrepare: string;
122
+ unrollAndClaimAssets: string;
123
+ swapToCompleteSell: string;
124
+ success: string;
119
125
  [key: string]: string;
120
126
  };
121
127
  export interface TranslationProviderProps {
@@ -1,13 +1,13 @@
1
1
  export declare const OVERLAY: {
2
2
  readonly TERMS_OF_USE: "TERMS_OF_USE";
3
3
  readonly HIGH_SLIPPAGE: "HIGH_SLIPPAGE";
4
- readonly FMP_WITHDRAWAL: "FMP_WITHDRAWAL";
5
4
  readonly TOKEN_SELECT: "TOKEN_SELECT";
6
5
  readonly POOL_SELECT: "POOL_SELECT";
7
6
  readonly TRADING: "TRADING";
8
7
  readonly ERROR_NOTIFICATION: "ERROR_NOTIFICATION";
9
8
  readonly LIMIT_SELLS: "LIMIT_SELLS";
10
9
  readonly LIMIT_ORDER_WITHDRAW: "LIMIT_ORDER_WITHDRAW";
10
+ readonly WITHDRAW_STEPPER: "WITHDRAW_STEPPER";
11
11
  };
12
12
  export type OverlayType = (typeof OVERLAY)[keyof typeof OVERLAY];
13
13
  export interface OverlayProps {
@@ -6,4 +6,4 @@ export declare const THEME_TYPE: {
6
6
  readonly CUSTOM: "custom";
7
7
  };
8
8
  export type ThemeType = (typeof THEME_TYPE)[keyof typeof THEME_TYPE];
9
- export type TokenIconSize = 'xs' | 'sm' | 'm' | 'lg' | 'xl';
9
+ export type TokenIconSize = 'xs' | 'sm' | 'm' | 'lg' | 'xl' | '2xl';
@@ -1,10 +0,0 @@
1
- import type { OverlayProps } from '../../../../types';
2
- export declare const useFmpWithdrawalOverlay: ({ type }: OverlayProps) => {
3
- isLoading: boolean;
4
- showUnlockTaxTip: boolean;
5
- showUnlockTaxAmount: boolean;
6
- unlockTaxAmount: string;
7
- unlockDate: string | null;
8
- handleReject: () => void;
9
- handleConfirm: () => Promise<void>;
10
- };
@@ -1,2 +0,0 @@
1
- import type { FC } from 'react';
2
- export declare const SwapButton: FC;
@@ -1,6 +0,0 @@
1
- export declare const useSwapButton: () => {
2
- disabled: boolean;
3
- label: string;
4
- handleClick: () => void;
5
- isLoading: boolean;
6
- };
@@ -1,3 +0,0 @@
1
- export declare const useCompleteStep: () => {
2
- showSwapButton: boolean;
3
- };
@@ -1,2 +0,0 @@
1
- import type { FC } from 'react';
2
- export declare const InitWithdrawButton: FC;
@@ -1,6 +0,0 @@
1
- export declare const useInitWithdrawButton: () => {
2
- isLoading: boolean;
3
- disabled: boolean;
4
- label: string;
5
- handleTrade: () => void;
6
- };
@@ -1,2 +0,0 @@
1
- import type { FC, PropsWithChildren } from 'react';
2
- export declare const WithdrawStepper: FC<PropsWithChildren>;
@@ -1,8 +0,0 @@
1
- export declare const useWithdrawStepper: () => {
2
- hideStepper: boolean;
3
- activeStepIndex: number;
4
- steps: {
5
- index: number;
6
- description: string | import("react/jsx-runtime").JSX.Element;
7
- }[];
8
- };