@dhedge/trading-widget 3.0.1 → 3.0.3

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 (21) hide show
  1. package/README.md +6 -5
  2. package/core-kit/const/default-data.d.ts +1 -1
  3. package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-quote.d.ts +1 -0
  4. package/core-kit/types/state.types.d.ts +3 -0
  5. package/{index-26dbd9f0.cjs → index-726044da.cjs} +49 -49
  6. package/{index-8bf02b18.js → index-8c8c0839.js} +8238 -8260
  7. package/index.cjs +1 -1
  8. package/index.js +1 -1
  9. package/package.json +1 -1
  10. package/{pyth-adapter-2fe8e19d.cjs → pyth-adapter-34a005b4.cjs} +1 -1
  11. package/{pyth-adapter-43b64859.js → pyth-adapter-b463bcd6.js} +1 -1
  12. package/style.css +1 -1
  13. package/trading-widget/components/{withdraw/init-step/input-group/withdraw-section → widget/widget-input}/all-assets-composition-table/all-assets-composition-table.d.ts +1 -1
  14. package/trading-widget/components/{withdraw/init-step/input-group/withdraw-section → widget/widget-input}/all-assets-composition-table/all-assets-composition-table.hooks.d.ts +2 -2
  15. package/trading-widget/components/withdraw/init-step/input-group/init-withdraw-input-group.hooks.d.ts +9 -1
  16. package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -0
  17. package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/single-asset-composition-table/single-asset-composition-table.d.ts +0 -3
  18. package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/single-asset-composition-table/single-asset-composition-table.hooks.d.ts +0 -10
  19. package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/withdraw-section.d.ts +0 -6
  20. package/trading-widget/components/withdraw/init-step/input-group/withdraw-section/withdraw-section.hooks.d.ts +0 -13
  21. /package/trading-widget/components/{withdraw/init-step/input-group/withdraw-section → widget/widget-input}/all-assets-composition-table/withdraw-explanation-tip.d.ts +0 -0
package/README.md CHANGED
@@ -112,7 +112,7 @@ UI configuration provider. Manages params to configure custom styling, component
112
112
  ##### params
113
113
 
114
114
  > | name | type | default value | description |
115
- > | ---------------------------------- | -------------------------------------------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
115
+ > | ---------------------------------- | -------------------------------------------------------------- | ---------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------|
116
116
  > | `isGeoBlocked` | `boolean` | `false` | Restricts depositing action button and conditionally renders GeoBlockAlert component |
117
117
  > | `isSanctioned` | `boolean` | `false` | Restricts depositing action button and conditionally renders SanctionedAlert component |
118
118
  > | `depositQuoteDiffWarningThreshold` | `number` | `1` | Deposit slippage absolute percent value warning threshold, Affects styling to warn user |
@@ -127,6 +127,7 @@ UI configuration provider. Manages params to configure custom styling, component
127
127
  > | `stakingChainId` | `number` | `10` (Optimism) | ChainId to be used in staking logic |
128
128
  > | `termsOfUseAccepted` | `boolean` | `true` | Requires user to confirm terms of use by rendering DepositTermsOfUse component before deposit action |
129
129
  > | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
130
+ > | `isAllAssetsWithdrawOptionDefault` | `boolean` | `false` | Sets "All Assets" withdraw option by default |
130
131
  > | `chainConfig` | `Partial<Record<ChainId, { name: string; iconPath: string }>>` | `{}` | Sets map of chain `name` and `iconPath` |
131
132
 
132
133
  ##### actions
@@ -513,10 +514,10 @@ path: `component.meta[name]`
513
514
  > | `claimAction` | string | Claim Without Swap | |
514
515
  > | `claimLabel` | string | Claim | |
515
516
  > | `swapAndClaimTo` | string | Swap and claim assets to | |
516
- > | `initWithdrawDescription` | string | Unroll {vaultSymbol} tokens into multi assets | |
517
- > | `initWithdrawTooltip` | string | Convertible tokens are basic ERC20 tokens which can be swapped on any DEXs | |
518
- > | `completeWithdrawDescription` | string | Swap multi assets into {assetSymbol} | |
519
- > | `completeWithdrawTooltip` | string | All swappable assets can be claimed directly without swap. | |
517
+ > | `initWithdrawDescription` | string | Unroll | |
518
+ > | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
519
+ > | `completeWithdrawDescription` | string | Claim | |
520
+ > | `completeWithdrawTooltip` | string | This final step swaps all assets to a single asset and sends it to your wallet | |
520
521
  > | `unrollAndClaimDescription` | string | Unroll {vaultSymbol} tokens and claim {assetSymbol} | |
521
522
  > | `total` | string | Total: | |
522
523
  > | `showAll` | string | Show All | |
@@ -12,7 +12,7 @@ export declare const EMPTY_POOL_CONFIG: PoolConfig;
12
12
  export declare const DEFAULT_DEPOSIT_METHOD: DepositMethodName;
13
13
  export declare const DEFAULT_WITHDRAW_SLIPPAGE = 1;
14
14
  export declare const DEFAULT_DEPOSIT_SLIPPAGE = 0;
15
- export declare const DEFAULT_NO_SWAP_MIN_DEPOSIT_AMOUNT_GAP = 0.2;
15
+ export declare const DEFAULT_NO_SWAP_MIN_DEPOSIT_AMOUNT_GAP = 0.5;
16
16
  export declare const DEFAULT_SWAP_TRANSACTION_SLIPPAGE = 0.3;
17
17
  export declare const DEFAULT_DEPOSIT_SLIPPAGE_SCALE: number[];
18
18
  export declare const DEFAULT_MULTI_ASSET_WITHDRAW_METHOD = "withdrawSafe";
@@ -0,0 +1 @@
1
+ export declare const useInitWithdrawQuote: () => void;
@@ -10,6 +10,9 @@ export interface TradingPanelStateModal {
10
10
  link?: string;
11
11
  sendTokens: TradingToken[] | null;
12
12
  receiveTokens: TradingToken[] | null;
13
+ meta?: {
14
+ withdrawPercentage?: number;
15
+ };
13
16
  }
14
17
  export interface TradingPanelState {
15
18
  settings: {