@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.
- package/README.md +35 -23
- package/core-kit/const/network.d.ts +127 -7
- package/core-kit/const/storage.d.ts +0 -3
- package/core-kit/const/trading.d.ts +2 -0
- package/core-kit/hooks/pool/use-available-manager-fee.d.ts +1 -1
- package/core-kit/hooks/pool/use-pool-dynamic-exit-remaining-cooldown.d.ts +1 -1
- package/core-kit/hooks/pool/use-user-vault-balance.d.ts +1 -1
- package/core-kit/hooks/state/action.d.ts +1 -1
- package/core-kit/hooks/state/index.d.ts +1 -0
- package/core-kit/hooks/state/stepper.d.ts +5 -0
- package/core-kit/hooks/trading/allowance/use-approve.d.ts +3 -1
- package/core-kit/hooks/trading/allowance/use-can-spend.d.ts +4 -1
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +1 -1
- package/core-kit/hooks/trading/index.d.ts +1 -0
- package/core-kit/hooks/trading/trade-handlers/use-handle-trade.d.ts +6 -1
- package/core-kit/hooks/trading/trade-handlers/use-trading-settle-handler.d.ts +7 -1
- package/core-kit/hooks/trading/use-easy-swapper-tracked-assets.d.ts +1 -1
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-auto-send-complete-withdraw-transaction.d.ts +6 -1
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-transaction.d.ts +3 -1
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-handle-complete-withdraw.d.ts +2 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-allowance.d.ts +7 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-transaction.d.ts +6 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-is-unroll-and-claim-transaction.d.ts +5 -1
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +1 -1
- package/core-kit/types/config.types.d.ts +1 -0
- package/core-kit/types/state.types.d.ts +8 -3
- package/core-kit/types/trading-panel.types.d.ts +7 -0
- package/core-kit/utils/formatter.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +4122 -3752
- package/limit-orders/hooks/use-user-limit-order.d.ts +1 -1
- package/package.json +3 -3
- package/style.css +1 -1
- package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-buttons/add-to-wallet-button/add-to-wallet-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/add-to-wallet-button/add-to-wallet-button.hooks.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/index.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/notifications-settings-button/notifications-settings-button.d.ts +3 -0
- package/trading-widget/components/widget/widget-buttons/withdraw-stepper-button/withdraw-stepper-button.d.ts +2 -0
- package/trading-widget/components/widget/widget-buttons/withdraw-stepper-button/withdraw-stepper-button.hooks.d.ts +4 -0
- package/trading-widget/components/widget/widget-input/widget-input.hooks.d.ts +1 -1
- package/trading-widget/components/widget/widget-overlay/error-notification-overlay/complete-withdraw-error-overlay.d.ts +7 -0
- package/trading-widget/components/widget/widget-overlay/error-notification-overlay/error-notification-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/index.d.ts +1 -1
- package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +1 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.hooks.d.ts +9 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/approve-step.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/approve-step.hooks.d.ts +10 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/complete-withdraw-step.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/complete-withdraw-step.hooks.d.ts +10 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/init-withdraw-step.d.ts +3 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/init-withdraw-step.hooks.d.ts +13 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/steps/step-item.d.ts +9 -0
- 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
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-stepper-overlay.hooks.d.ts +14 -0
- package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-steps.d.ts +11 -0
- package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +1 -2
- package/trading-widget/hooks/index.d.ts +3 -0
- package/trading-widget/hooks/use-display-limit-sell-overlay.d.ts +1 -0
- package/trading-widget/hooks/use-step-description.d.ts +1 -0
- package/trading-widget/hooks/use-transaction-status-label.d.ts +5 -0
- package/trading-widget/providers/component-provider/component-provider.d.ts +1 -0
- package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +1 -0
- package/trading-widget/providers/component-provider/component-provider.types.d.ts +5 -0
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
- package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +6 -0
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +13 -7
- package/trading-widget/types/overlay.types.d.ts +1 -1
- package/trading-widget/types/theme.types.d.ts +1 -1
- package/trading-widget/components/widget/widget-overlay/fmp-withdrawal-overlay/fmp-withdrawal-overlay.hooks.d.ts +0 -10
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.d.ts +0 -2
- package/trading-widget/components/withdraw/complete-step/button/swap-button/swap-button.hooks.d.ts +0 -6
- package/trading-widget/components/withdraw/complete-step/complete-step.hooks.d.ts +0 -3
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.d.ts +0 -2
- package/trading-widget/components/withdraw/init-step/button/init-withdraw-button/init-withdraw-button.hooks.d.ts +0 -6
- package/trading-widget/components/withdraw/stepper/withdraw-stepper.d.ts +0 -2
- 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
|
-
|
|
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
|
-
};
|