@dhedge/trading-widget 4.3.0-canary.4 → 4.3.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 (44) hide show
  1. package/README.md +119 -127
  2. package/core-kit/const/gmx.d.ts +1 -0
  3. package/core-kit/const/logger.d.ts +0 -2
  4. package/core-kit/hooks/state/action.d.ts +1 -0
  5. package/core-kit/hooks/state/index.d.ts +2 -2
  6. package/core-kit/hooks/state/settings.d.ts +5 -0
  7. package/core-kit/types/config.types.d.ts +0 -1
  8. package/core-kit/types/state.types.d.ts +5 -0
  9. package/core-kit/types/trading-panel.types.d.ts +1 -1
  10. package/index.cjs +10 -10
  11. package/index.d.ts +3 -3
  12. package/index.js +6859 -7130
  13. package/limit-orders/index.d.ts +0 -3
  14. package/package.json +1 -1
  15. package/style.css +1 -1
  16. package/trading-widget/components/common/alert/alert.d.ts +0 -1
  17. package/trading-widget/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +0 -1
  18. package/trading-widget/components/widget/widget-meta/index.d.ts +1 -1
  19. package/trading-widget/components/widget/widget-overlay/index.d.ts +0 -1
  20. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +0 -1
  21. package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-overlay.hooks.d.ts +0 -1
  22. package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +0 -2
  23. package/trading-widget/providers/component-provider/component-provider.d.ts +0 -1
  24. package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +0 -1
  25. package/trading-widget/providers/component-provider/component-provider.types.d.ts +0 -1
  26. package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +0 -10
  27. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -9
  28. package/trading-widget/types/overlay.types.d.ts +0 -1
  29. package/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-order-withdraw.d.ts +0 -1
  30. package/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-withdraw-order-approved.d.ts +0 -1
  31. package/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-amount.d.ts +0 -2
  32. package/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-transaction.d.ts +0 -1
  33. package/core-kit/hooks/trading/limit-order-withdraw/use-limit-withdraw-approve-transaction.d.ts +0 -4
  34. package/core-kit/hooks/trading/trade-handlers/use-handle-limit-order-withdraw.d.ts +0 -10
  35. package/trading-widget/components/widget/widget-overlay/limit-order-withdraw-overlay/limit-order-withdraw-approve-button/limit-order-withdraw-approve-button.d.ts +0 -2
  36. package/trading-widget/components/widget/widget-overlay/limit-order-withdraw-overlay/limit-order-withdraw-approve-button/limit-order-withdraw-approve-button.hooks.d.ts +0 -5
  37. package/trading-widget/components/widget/widget-overlay/limit-order-withdraw-overlay/limit-order-withdraw-button/limit-order-withdraw-button.d.ts +0 -6
  38. package/trading-widget/components/widget/widget-overlay/limit-order-withdraw-overlay/limit-order-withdraw-button/limit-order-withdraw-button.hooks.d.ts +0 -5
  39. package/trading-widget/components/widget/widget-overlay/limit-order-withdraw-overlay/limit-order-withdraw-overlay.d.ts +0 -3
  40. package/trading-widget/components/widget/widget-overlay/limit-order-withdraw-overlay/limit-order-withdraw-terms-content.d.ts +0 -6
  41. package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/limit-order-withdrawal-overlay.d.ts +0 -3
  42. package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/limit-order-withdrawal-overlay.hooks.d.ts +0 -5
  43. package/trading-widget/components/withdraw/init-step/button/limit-order-withdraw-button/limit-order-withdraw-button.d.ts +0 -2
  44. package/trading-widget/components/withdraw/init-step/button/limit-order-withdraw-button/limit-order-withdraw-button.hooks.d.ts +0 -4
package/README.md CHANGED
@@ -81,18 +81,19 @@ Top level provider component. Headless part of trading logic. API handles params
81
81
  <details>
82
82
  <summary><code>initialState</code> <code><b>/</b></code> <code>Optional initial state of trading panel</code></summary>
83
83
 
84
- > | name | type | default value | description |
85
- > | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
86
- > | `poolAddress` | Address | `AddressZero` | Current active pool address |
87
- > | `poolConfigMap` | Record<Address, PoolConfig> | `{}` | Map of pool configs available for trading |
88
- > | `settings` | { slippage: `number \| 'auto'`; minSlippage?: `number`; isInfiniteAllowance: `boolean`; isMultiAssetWithdrawalEnabled: `boolean`; isCustomDepositOptionsDisabled?: `boolean`; isMaxSlippageLoading: `boolean`; availableAggregators: `string[]` } | { slippage: `'auto'`; isInfiniteAllowance: `false`; isMultiAssetWithdrawalEnabled: `true`; isMaxSlippageLoading: `false`; availableAggregators: `[]` } | Panel settings |
89
- > | `type` | 'deposit' \| 'withdraw' | `'deposit'` | Trading type |
90
- > | `input` | { sendToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }; receiveToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` } } | `poolConfigMap[poolAddress]` | Send/receive tokens pair |
91
- > | `entryFee` | { deposit: `number`; depositWithCustomCooldown: `number`; } | { deposit: `0`; depositWithCustomCooldown: `0.1` } | Entry fee config map |
92
- > | `modal` | { isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'`; action: `'deposit' \| 'withdraw' \| 'approve \`; link?: `string`; sendToken: TradingToken \| null; receiveToken: TradingToken \| null } | `{ isOpen: `false`,status: `'None'`, receiveToken: `null`, sendToken: `null` }` | Trading modal state |
93
- > | `transactions` | { action: `'deposit' \| 'withdraw' \| 'approve'`; symbol: `string`; chainId: `ChainId`; txHash?: `Address` }[] | `[]` | Pending transactions |
94
- > | `poolFallbackData` | { address: `Address`; managerLogicAddress?: `Address`; poolCompositions: `PoolComposition[]`; tokenPrice?: `string`; apy?: { value: `number`; currency: `'USD' \| 'ETH'` } } | { address: `AddressZero` } | Current active pool fallback data to override or extend contract's response |
95
- > | `defaultChainId` | number (optional) | undefined | Chain id that will be returned from useNetwork wagmi hook when connected to unsupported network |
84
+ > | name | type | default value | description |
85
+ > | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
86
+ > | `poolAddress` | Address | `AddressZero` | Current active pool address |
87
+ > | `poolConfigMap` | Record<Address, PoolConfig> | `{}` | Map of pool configs available for trading |
88
+ > | `settings` | { slippage: `number \| 'auto'`; minSlippage?: `number`; isInfiniteAllowance: `boolean`; isMultiAssetWithdrawalEnabled: `boolean`; isCustomDepositOptionsDisabled?: `boolean`; isMaxSlippageLoading: `boolean`; availableAggregators: `string[]` } | { slippage: `'auto'`; isInfiniteAllowance: `false`; isMultiAssetWithdrawalEnabled: `true`; isMaxSlippageLoading: `false`; availableAggregators: `[]` } | Panel settings |
89
+ > | `type` | 'deposit' \| 'withdraw' | `'deposit'` | Trading type |
90
+ > | `input` | { sendToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }; receiveToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` } } | `poolConfigMap[poolAddress]` | Send/receive tokens pair |
91
+ > | `entryFee` | { deposit: `number`; depositWithCustomCooldown: `number`; } | { deposit: `0`; depositWithCustomCooldown: `0.1` } | Entry fee config map |
92
+ > | `modal` | { isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'`; action: `'deposit' \| 'withdraw' \| 'approve \`; link?: `string`; sendToken: TradingToken \| null; receiveToken: TradingToken \| null } | `{ isOpen: `false`,status: `'None'`, receiveToken: `null`, sendToken: `null` }` | Trading modal state |
93
+ > | `transactions` | { action: `'deposit' \| 'withdraw' \| 'approve'`; symbol: `string`; chainId: `ChainId`; txHash?: `Address` }[] | `[]` | Pending transactions |
94
+ > | `poolFallbackData` | { address: `Address`; managerLogicAddress?: `Address`; poolCompositions: `PoolComposition[]`; tokenPrice?: `string`; apy?: { value: `number`; currency: `'USD' \| 'ETH'` } } | { address: `AddressZero` } | Current active pool fallback data to override or extend contract's response |
95
+ > | `defaultChainId` | number (optional) | undefined | Chain id that will be returned from useNetwork wagmi hook when connected to unsupported network |
96
+ > | `customDepositTokensPerChain` | Record<ChainId, TradingToken[]> | `undefined` | Per-chain map of extra deposit tokens that are appended to `depositParams.customTokens`. |
96
97
 
97
98
  ###### Source: `packages/trading-widget/src/core-kit/providers/index.tsx`
98
99
 
@@ -481,121 +482,112 @@ path: `component.meta[name]`
481
482
  <code>Translation keys</code>
482
483
  </summary>|
483
484
 
484
- > | name | type | default value | description |
485
- > | ----------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
486
- > | `depositSlippageWarning` | string | Excludes entry fee. | |
487
- > | `withdrawSlippageWarning` | string | Slippage only applies to single asset withdrawals and withdrawals from vaults with debt positions in Aave. | |
488
- > | `minSlippageWarning` | string | Flexible min slippage value that is likely enough to process the transaction. | |
489
- > | `highSlippageWarning` | string | We recommend using another asset to trade with lower slippage. | |
490
- > | `recommendedMinSlippage` | string | Recommended Min Slippage | |
491
- > | `projectedDailyEarningsTooltip` | string | Projected daily earnings are based on the current APY and may differ from actual earnings. | |
492
- > | `dailyEarnings` | string | Daily Earnings | |
493
- > | `projectedYearlyEarningsTooltip` | string | Projected yearly earnings are based on the current APY and may differ from actual earnings. | |
494
- > | `yearlyEarnings` | string | Yearly Earnings | |
495
- > | `fullReceiveDetails` | string | See full details influencing what you will receive. | |
496
- > | `tradeDetails` | string | Trade details | |
497
- > | `maxSlippage` | string | Max slippage | |
498
- > | `minReceiveAmount` | string | You will receive no less than this amount. | |
499
- > | `minReceived` | string | Minimum Received | |
500
- > | `estimatedMultiAssetFractions` | string | Estimated multi asset fractions | |
501
- > | `infinite` | string | Infinite | |
502
- > | `tokenAllowance` | string | Token Allowance | |
503
- > | `entryFee` | string | Entry Fee | |
504
- > | `entryFeeExplanation` | string | When you deposit, the token takes a small entry fee. This fee helps cover the costs when we rebalance the underlying funds, and it's shared among all token holders. | |
505
- > | `minDepositUsd` | string | Minimum deposit in USD. | |
506
- > | `minDeposit` | string | Minimum Deposit | |
507
- > | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
508
- > | `slippageTolerance` | string | Slippage tolerance | |
509
- > | `bypassEntryFee` | string | Bypass Entry Fee | |
510
- > | `tokenAmountToApprove` | string | Amount of tokens to be approved. | |
511
- > | `auto` | string | Auto | |
512
- > | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
513
- > | `deposit` | string | Buy | |
514
- > | `withdraw` | string | Sell | |
515
- > | `max` | string | Max | |
516
- > | `allAssets` | string | All Assets | |
517
- > | `all` | string | All | |
518
- > | `sell` | string | Sell | |
519
- > | `receiveEstimated` | string | Receive (estimated) | |
520
- > | `confirmInWallet` | string | Please confirm in wallet | |
521
- > | `pending` | string | Pending... | |
522
- > | `approve` | string | Approve | |
523
- > | `connectWallet` | string | Connect Wallet | |
524
- > | `minimumPurchase` | string | Minimum purchase is {value} | |
525
- > | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
526
- > | `poolDepositsAreMaintenance` | string | {poolSymbol} token is under maintenance. Deposits are temporarily blocked. | |
527
- > | `poolWithdrawalsAreMaintenance` | string | {poolSymbol} token is under maintenance. Withdrawals are temporarily blocked. | |
528
- > | `poolIsPrivate` | string | This vault is currently private | |
529
- > | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
530
- > | `withdrawalLiquidityDisabled` | string | Intended withdraw value is greater than available liquidity ({value}) | |
531
- > | `withdrawCooldown` | string | You can sell your {tokenSymbol} tokens in {cooldownEndTime} | |
532
- > | `termsOfUse` | string | Terms Of Use | |
533
- > | `termOfUseDepositListTitle` | string | Please know the following before depositing | |
534
- > | `termOfUseDepositAssetSlippage` | string | When exiting, investors receive single asset or the underlying vault assets. Withdraw slippage can be customized in withdraw settings | |
535
- > | `termOfUseDepositBugs` | string | There may be interface bugs on the platform | |
536
- > | `termOfUseDepositDowntime` | string | There may be interface downtime (planned and unplanned) | |
537
- > | `termOfUseDepositAuditRisk` | string | Smart contracts are audited but a risk is still present | |
538
- > | `termOfUseDepositAccept` | string | Accept & Deposit | |
539
- > | `back` | string | Back | |
540
- > | `done` | string | Done | |
541
- > | `termOfUseWithdrawAcceptLabel` | string | I understand and accept the withdraw terms | |
542
- > | `termOfUseWithdrawPoint1` | string | Withdrawal requests are intended to settle in USDC. In rare cases where market conditions or high slippage prevent a USDC swap, the order may be settled in the underlying tokens of the respective vault. | |
543
- > | `termOfUseWithdrawPoint2` | string | Revoking token approval after placing an order will prevent the order from being executed. | |
544
- > | `highSlippage` | string | High Slippage Alert | |
545
- > | `responsibleHighSlippage` | string | By proceeding with this trade, you acknowledge and accept the possibility of experiencing high slippage, resulting in a potential difference between the expected and executed price. | |
546
- > | `highSlippageListTitle` | string | Please consider the following before confirming | |
547
- > | `highSlippageQuoteDiff` | string | Be aware that the final amount of assets you receive may be different from the initially quoted value. | |
548
- > | `highSlippageRisk` | string | Ensure that you understand the risks associated with high slippage and are comfortable proceeding with the trade. | |
549
- > | `confirm` | string | Confirm | |
550
- > | `selectToken` | string | Select Token | |
551
- > | `sendingOrderToWallet` | string | Sending order to your wallet | |
552
- > | `settingUpTx` | string | Setting up transaction | |
553
- > | `miningTx` | string | Processing | |
554
- > | `approveSpending` | string | Approve {symbol} spending | |
555
- > | `pay` | string | Pay | |
556
- > | `multiAssetFractions` | string | multi asset fractions | |
557
- > | `swappableAssets` | string | swappable assets | |
558
- > | `explorer` | string | Explorer | |
559
- > | `as` | string | As | |
560
- > | `switchNetwork` | string | Switch Network | |
561
- > | `depositAction` | string | Buy | |
562
- > | `withdrawAction` | string | Sell | |
563
- > | `swapAction` | string | Swap | |
564
- > | `unrollAction` | string | Unroll | |
565
- > | `unrollAndClaimAction` | string | Claim | |
566
- > | `claimAction` | string | Claim Without Swap | |
567
- > | `claimLabel` | string | Claim Assets | |
568
- > | `createLimitSellOrder` | string | Stop order set | |
569
- > | `swapAndClaimTo` | string | Swap and claim assets to | |
570
- > | `initWithdrawDescription` | string | Unroll | |
571
- > | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
572
- > | `completeWithdrawDescription` | string | Claim | |
573
- > | `completeWithdrawTooltip` | string | This final step swaps all assets to a single asset and sends it to your wallet | |
574
- > | `unrollAndClaimDescription` | string | Claim | |
575
- > | `limitOrderWithdrawDescription` | string | You are about to create a withdrawal request. Your vault tokens will be withdrawn within a few minutes. | |
576
- > | `total` | string | Total: | |
577
- > | `showAll` | string | Show All | |
578
- > | `hide` | string | Hide | |
579
- > | `refreshSwapQuoteTooltip` | string | Refresh swap quote | |
580
- > | `proceedWithNextStep` | string | Please proceed with the next step. | |
581
- > | `aggregatorsLabel` | string | Swap source | |
582
- > | `aggregatorsTooltip` | string | Choose which aggregators to use for your trades. | |
583
- > | `batchTransactionsLabel` | string | Batch transactions | |
584
- > | `batchTransactionsSwitchLabel` | string | Batch | |
585
- > | `batchTransactionsTooltip` | string | Group approve and trade calls into a single batch transaction. Disable if you prefer separate prompts. | |
586
- > | `openLimitOrderAfterBuySwitchLabel` | string | Add Stop Order | |
587
- > | `orderingLabel` | string | Ordering | |
588
- > | `paidLabel` | string | Paid | |
589
- > | `priceLabel` | string | Price | |
590
- > | `transactionLabel` | string | Transaction | |
591
- > | `stopOrder` | string | Stop Order | |
592
- > | `send` | string | Send | |
593
- > | `cooldown` | string | Cooldown | |
594
- > | `delete` | string | Delete | |
595
- > | `withdrawalRequest` | string | Withdrawal request | |
596
- > | `deleteWithdrawalRequest` | string | Delete withdrawal request | |
597
- > | `insufficientBalance` | string | Insufficient Balance | |
598
- > | `expectToReceiveUsdcSoon` | string | Expect to receive your USDC over the next few minutes | |
485
+ > | name | type | default value | description |
486
+ > | ----------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
487
+ > | `depositSlippageWarning` | string | Excludes entry fee. | |
488
+ > | `withdrawSlippageWarning` | string | Slippage only applies to single asset withdrawals and withdrawals from vaults with debt positions in Aave. | |
489
+ > | `minSlippageWarning` | string | Flexible min slippage value that is likely enough to process the transaction. | |
490
+ > | `highSlippageWarning` | string | We recommend using another asset to trade with lower slippage. | |
491
+ > | `recommendedMinSlippage` | string | Recommended Min Slippage | |
492
+ > | `projectedDailyEarningsTooltip` | string | Projected daily earnings are based on the current APY and may differ from actual earnings. | |
493
+ > | `dailyEarnings` | string | Daily Earnings | |
494
+ > | `projectedYearlyEarningsTooltip` | string | Projected yearly earnings are based on the current APY and may differ from actual earnings. | |
495
+ > | `yearlyEarnings` | string | Yearly Earnings | |
496
+ > | `fullReceiveDetails` | string | See full details influencing what you will receive. | |
497
+ > | `tradeDetails` | string | Trade details | |
498
+ > | `maxSlippage` | string | Max slippage | |
499
+ > | `minReceiveAmount` | string | You will receive no less than this amount. | |
500
+ > | `minReceived` | string | Minimum Received | |
501
+ > | `estimatedMultiAssetFractions` | string | Estimated multi asset fractions | |
502
+ > | `infinite` | string | Infinite | |
503
+ > | `tokenAllowance` | string | Token Allowance | |
504
+ > | `entryFee` | string | Entry Fee | |
505
+ > | `entryFeeExplanation` | string | When you deposit, the token takes a small entry fee. This fee helps cover the costs when we rebalance the underlying funds, and it's shared among all token holders. | |
506
+ > | `minDepositUsd` | string | Minimum deposit in USD. | |
507
+ > | `minDeposit` | string | Minimum Deposit | |
508
+ > | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
509
+ > | `slippageTolerance` | string | Slippage tolerance | |
510
+ > | `bypassEntryFee` | string | Bypass Entry Fee | |
511
+ > | `tokenAmountToApprove` | string | Amount of tokens to be approved. | |
512
+ > | `auto` | string | Auto | |
513
+ > | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
514
+ > | `deposit` | string | Buy | |
515
+ > | `withdraw` | string | Sell | |
516
+ > | `max` | string | Max | |
517
+ > | `allAssets` | string | All Assets | |
518
+ > | `all` | string | All | |
519
+ > | `sell` | string | Sell | |
520
+ > | `receiveEstimated` | string | Receive (estimated) | |
521
+ > | `confirmInWallet` | string | Please confirm in wallet | |
522
+ > | `pending` | string | Pending... | |
523
+ > | `approve` | string | Approve | |
524
+ > | `connectWallet` | string | Connect Wallet | |
525
+ > | `minimumPurchase` | string | Minimum purchase is {value} | |
526
+ > | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
527
+ > | `poolDepositsAreMaintenance` | string | {poolSymbol} token is under maintenance. Deposits are temporarily blocked. | |
528
+ > | `poolWithdrawalsAreMaintenance` | string | {poolSymbol} token is under maintenance. Withdrawals are temporarily blocked. | |
529
+ > | `poolIsPrivate` | string | This vault is currently private | |
530
+ > | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
531
+ > | `withdrawalLiquidityDisabled` | string | Intended withdraw value is greater than available liquidity ({value}) | |
532
+ > | `withdrawCooldown` | string | You can sell your {tokenSymbol} tokens in {cooldownEndTime} | |
533
+ > | `termsOfUse` | string | Terms Of Use | |
534
+ > | `termOfUseDepositListTitle` | string | Please know the following before depositing | |
535
+ > | `termOfUseDepositAssetSlippage` | string | When exiting, investors receive single asset or the underlying vault assets. Withdraw slippage can be customized in withdraw settings | |
536
+ > | `termOfUseDepositBugs` | string | There may be interface bugs on the platform | |
537
+ > | `termOfUseDepositDowntime` | string | There may be interface downtime (planned and unplanned) | |
538
+ > | `termOfUseDepositAuditRisk` | string | Smart contracts are audited but a risk is still present | |
539
+ > | `termOfUseDepositAccept` | string | Accept & Deposit | |
540
+ > | `back` | string | Back | |
541
+ > | `done` | string | Done | |
542
+ > | `highSlippage` | string | High Slippage Alert | |
543
+ > | `responsibleHighSlippage` | string | By proceeding with this trade, you acknowledge and accept the possibility of experiencing high slippage, resulting in a potential difference between the expected and executed price. | |
544
+ > | `highSlippageListTitle` | string | Please consider the following before confirming | |
545
+ > | `highSlippageQuoteDiff` | string | Be aware that the final amount of assets you receive may be different from the initially quoted value. | |
546
+ > | `highSlippageRisk` | string | Ensure that you understand the risks associated with high slippage and are comfortable proceeding with the trade. | |
547
+ > | `confirm` | string | Confirm | |
548
+ > | `selectToken` | string | Select Token | |
549
+ > | `sendingOrderToWallet` | string | Sending order to your wallet | |
550
+ > | `settingUpTx` | string | Setting up transaction | |
551
+ > | `miningTx` | string | Processing | |
552
+ > | `approveSpending` | string | Approve {symbol} spending | |
553
+ > | `pay` | string | Pay | |
554
+ > | `multiAssetFractions` | string | multi asset fractions | |
555
+ > | `swappableAssets` | string | swappable assets | |
556
+ > | `explorer` | string | Explorer | |
557
+ > | `as` | string | As | |
558
+ > | `switchNetwork` | string | Switch Network | |
559
+ > | `depositAction` | string | Buy | |
560
+ > | `withdrawAction` | string | Sell | |
561
+ > | `swapAction` | string | Swap | |
562
+ > | `unrollAction` | string | Unroll | |
563
+ > | `unrollAndClaimAction` | string | Claim | |
564
+ > | `claimAction` | string | Claim Without Swap | |
565
+ > | `claimLabel` | string | Claim Assets | |
566
+ > | `createLimitSellOrder` | string | Stop order set | |
567
+ > | `swapAndClaimTo` | string | Swap and claim assets to | |
568
+ > | `initWithdrawDescription` | string | Unroll | |
569
+ > | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
570
+ > | `completeWithdrawDescription` | string | Claim | |
571
+ > | `completeWithdrawTooltip` | string | This final step swaps all assets to a single asset and sends it to your wallet | |
572
+ > | `unrollAndClaimDescription` | string | Claim | |
573
+ > | `total` | string | Total: | |
574
+ > | `showAll` | string | Show All | |
575
+ > | `hide` | string | Hide | |
576
+ > | `refreshSwapQuoteTooltip` | string | Refresh swap quote | |
577
+ > | `proceedWithNextStep` | string | Please proceed with the next step. | |
578
+ > | `aggregatorsLabel` | string | Swap source | |
579
+ > | `aggregatorsTooltip` | string | Choose which aggregators to use for your trades. | |
580
+ > | `batchTransactionsLabel` | string | Batch transactions | |
581
+ > | `batchTransactionsSwitchLabel` | string | Batch | |
582
+ > | `batchTransactionsTooltip` | string | Group approve and trade calls into a single batch transaction. Disable if you prefer separate prompts. | |
583
+ > | `openLimitOrderAfterBuySwitchLabel` | string | Add Stop Order | |
584
+ > | `orderingLabel` | string | Ordering | |
585
+ > | `paidLabel` | string | Paid | |
586
+ > | `priceLabel` | string | Price | |
587
+ > | `transactionLabel` | string | Transaction | |
588
+ > | `stopOrder` | string | Stop Order | |
589
+ > | `send` | string | Send | |
590
+ > | `cooldown` | string | Cooldown | |
599
591
 
600
592
  ###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
601
593
 
@@ -10,6 +10,7 @@ export declare const GMX_MARKET_ASSETS_MAP: {
10
10
  readonly CRV_ARBITRUM: "0x0e46941f9bff8d0784bffa3d0d7883cdb82d7ae7";
11
11
  readonly HYPE_ARBITRUM: "0xbcb8fe13d02b023e8f94f6881cc0192fd918a5c0";
12
12
  readonly BNB_ARBITRUM: "0x2d340912aa47e33c90efb078e69e70efe2b34b9b";
13
+ readonly BNB_WBTC_USDC_ARBITRUM: "0x065577D05c3D4C11505ed7bc97BBF85d462A6A6f";
13
14
  readonly LINK_ARBITRUM: "0x7f1fa204bb700853d36994da19f830b6ad18455c";
14
15
  readonly PUMP_ARBITRUM: "0x4c0bb704529fa49a26bd854802d70206982c6f1b";
15
16
  };
@@ -14,8 +14,6 @@ export declare const TRADING_PANEL_LOG_EVENT: {
14
14
  BATCH_TRANSACTIONS_CHANGE: string;
15
15
  CREATE_LIMIT_SELL_ORDER: string;
16
16
  OPEN_LIMIT_SELL_VIEW: string;
17
- LIMIT_ORDER_WITHDRAW: string;
18
- LIMIT_ORDER_WITHDRAW_DELETE: string;
19
17
  };
20
18
  export declare const LOG_EVENT_BY_TRANSACTION_ACTION_MAP: Record<TransactionAction, string[]>;
21
19
  /**
@@ -29,3 +29,4 @@ export declare const useGetSwapData: () => ({ signal, variables, }: {
29
29
  }) => Promise<import('../../types').SwapDataResponse | null>;
30
30
  export declare const useUpdatePoolConfig: () => (payload: Record<`0x${string}`, Pick<import('../../types').PoolConfig, "maintenance" | "maintenanceDeposits" | "maintenanceWithdrawals">>) => void;
31
31
  export declare const useAddPoolConfig: () => (payload: import('../../types').PoolConfig) => void;
32
+ export declare const useUpdateCustomDepositTokensPerChain: () => (payload: Record<number, import('../../types').TradingToken[]>) => void;
@@ -1,7 +1,7 @@
1
- export { useSetTradingType, useUpdateTradingModal, useUpdateSendTokenInput, useSetPoolAddress, useUpdateReceiveTokenInput, useUpdateTradingSettings, useOnTransactionError, useOnTransactionSuccess, useOnTransactionEstimationError, useOnTokenSelector, useTradingPanelLogger, useOnSimulateTransaction, useUpdatePoolFallbackData, useOnTradingSettleError, useGetSwapData, useUpdatePoolConfig, useAddPoolConfig, } from '../../hooks/state/action';
1
+ export { useSetTradingType, useUpdateTradingModal, useUpdateSendTokenInput, useSetPoolAddress, useUpdateReceiveTokenInput, useUpdateTradingSettings, useOnTransactionError, useOnTransactionSuccess, useOnTransactionEstimationError, useOnTokenSelector, useTradingPanelLogger, useOnSimulateTransaction, useUpdatePoolFallbackData, useOnTradingSettleError, useGetSwapData, useUpdatePoolConfig, useAddPoolConfig, useUpdateCustomDepositTokensPerChain, } from '../../hooks/state/action';
2
2
  export { useTradingPanelPoolAddress, useTradingPanelPoolConfig, useTradingPanelPoolConfigs, useTradingPanelPoolFallbackData, useIsPoolAddress, } from '../../hooks/state/pool';
3
3
  export { useSendTokenInput, useReceiveTokenInput, } from '../../hooks/state/input';
4
- export { useTradingPanelSettings } from '../../hooks/state/settings';
4
+ export { useTradingPanelSettings, useCustomDepositTokensPerChain, } from '../../hooks/state/settings';
5
5
  export { useTradingPanelModal } from '../../hooks/state/modal';
6
6
  export { useTradingPanelType, useIsDepositTradingPanelType, } from '../../hooks/state/type';
7
7
  export { useTradingPanelTransactions } from '../../hooks/state/transaction';
@@ -1,5 +1,10 @@
1
+ import type { ChainId, TradingToken } from '../../types';
1
2
  import type { TradingPanelActionsState, TradingPanelState } from '../../types/state.types';
2
3
  export declare const useTradingPanelSettings: () => [
3
4
  TradingPanelState['settings'],
4
5
  TradingPanelActionsState['updateTradingSettings']
5
6
  ];
7
+ export declare const useCustomDepositTokensPerChain: () => [
8
+ Partial<Record<ChainId, TradingToken[]>> | undefined,
9
+ TradingPanelActionsState['updateCustomDepositTokensPerChain']
10
+ ];
@@ -22,7 +22,6 @@ export interface PoolConfig {
22
22
  maintenanceDeposits?: boolean;
23
23
  maintenanceWithdrawals?: boolean;
24
24
  pricingAsset?: PricingAsset;
25
- onDemandWithdrawalEnabled?: boolean;
26
25
  }
27
26
  export interface PoolFallbackData {
28
27
  address: Address;
@@ -37,6 +37,7 @@ export interface TradingPanelState {
37
37
  transactions: PendingTransaction[];
38
38
  poolFallbackData: PoolFallbackData;
39
39
  defaultChainId?: ChainId;
40
+ customDepositTokensPerChain?: Record<ChainId, TradingToken[]>;
40
41
  }
41
42
  export interface TradingPanelSetters {
42
43
  setPoolAddress: (payload: TradingPanelState['poolAddress']) => void;
@@ -49,6 +50,7 @@ export interface TradingPanelSetters {
49
50
  updatePoolFallbackData: (payload: PoolFallbackData) => void;
50
51
  updatePoolConfig: (payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance' | 'maintenanceDeposits' | 'maintenanceWithdrawals'>>) => void;
51
52
  addPoolConfig: (payload: PoolConfig) => void;
53
+ updateCustomDepositTokensPerChain: (payload: Record<ChainId, TradingToken[]>) => void;
52
54
  }
53
55
  export interface CallbackConfig {
54
56
  onSetPoolAddress: TradingPanelSetters['setPoolAddress'];
@@ -100,6 +102,9 @@ export type TradingPanelAction = {
100
102
  } | {
101
103
  type: 'ADD_POOL_CONFIG';
102
104
  payload: PoolConfig;
105
+ } | {
106
+ type: 'UPDATE_CUSTOM_DEPOSIT_TOKENS_PER_CHAIN';
107
+ payload: Record<ChainId, TradingToken[]>;
103
108
  };
104
109
  export interface TradingPanelContextConfig {
105
110
  actions: Partial<CallbackConfig> & Pick<CallbackConfig, 'getSwapData'>;
@@ -28,7 +28,7 @@ type RemoveTransaction = {
28
28
  } & Partial<PendingTransaction>;
29
29
  export type UpdateTransactionsArguments = AddTransaction | UpdateTransaction | RemoveTransaction;
30
30
  export type TradingPanelType = 'deposit' | 'withdraw';
31
- export type TransactionAction = 'deposit' | 'multi_withdraw' | 'single_withdraw' | 'approve' | 'swap' | 'claim' | 'single_withdraw_and_claim' | 'create_limit_sell_order' | 'limit_order_withdraw' | 'delete_limit_order_withdraw';
31
+ export type TransactionAction = 'deposit' | 'multi_withdraw' | 'single_withdraw' | 'approve' | 'swap' | 'claim' | 'single_withdraw_and_claim' | 'create_limit_sell_order';
32
32
  export type SwapEntity = 'token' | 'pool';
33
33
  export interface TokenSelectorPayload {
34
34
  isOpen: boolean;