@dhedge/trading-widget 1.2.10 → 2.0.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 (76) hide show
  1. package/README.md +110 -110
  2. package/core-kit/abi/easy-swapper-v2.d.ts +413 -0
  3. package/core-kit/abi/flatcoin-points-module.d.ts +1 -1
  4. package/core-kit/abi/index.d.ts +2 -1
  5. package/core-kit/const/config.d.ts +1 -1
  6. package/core-kit/const/contracts/arbitrum.d.ts +1 -0
  7. package/core-kit/const/contracts/base.d.ts +1 -0
  8. package/core-kit/const/contracts/optimism.d.ts +1 -0
  9. package/core-kit/const/contracts/polygon.d.ts +1 -0
  10. package/core-kit/const/default-data.d.ts +3 -7
  11. package/core-kit/const/index.d.ts +1 -0
  12. package/core-kit/const/logger.d.ts +0 -1
  13. package/core-kit/const/tokens/index.d.ts +2 -1
  14. package/core-kit/const/trading.d.ts +10 -0
  15. package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +530 -401
  16. package/core-kit/hooks/pool/use-pool-fees.d.ts +0 -1
  17. package/core-kit/hooks/state/action.d.ts +4 -1
  18. package/core-kit/hooks/state/index.d.ts +3 -3
  19. package/core-kit/hooks/state/meta.d.ts +0 -2
  20. package/core-kit/hooks/state/pool.d.ts +0 -2
  21. package/core-kit/hooks/trading/deposit-v2/index.d.ts +16 -0
  22. package/core-kit/hooks/trading/deposit-v2/use-applied-deposit-slippage.d.ts +1 -0
  23. package/core-kit/hooks/trading/deposit-v2/use-deposit-lock-time.d.ts +1 -0
  24. package/core-kit/hooks/trading/deposit-v2/use-deposit-price-diff.d.ts +5 -0
  25. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +414 -0
  26. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote.d.ts +1 -0
  27. package/core-kit/hooks/trading/deposit-v2/use-deposit-slippage.d.ts +1 -0
  28. package/core-kit/hooks/trading/deposit-v2/use-is-custom-cooldown-deposit.d.ts +1 -0
  29. package/core-kit/hooks/trading/deposit-v2/use-is-deposit-with-swap-transaction.d.ts +1 -0
  30. package/core-kit/hooks/trading/deposit-v2/use-is-vault-deposit-locked.d.ts +4 -0
  31. package/core-kit/hooks/trading/deposit-v2/use-min-vault-tokens-received-amount.d.ts +1 -0
  32. package/core-kit/hooks/trading/deposit-v2/use-swap-data-based-on-send-token.d.ts +1 -0
  33. package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-params.d.ts +2 -0
  34. package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-token-amount.d.ts +1 -0
  35. package/core-kit/hooks/trading/{deposit/use-pool-deposit-tokens.d.ts → deposit-v2/use-vault-deposit-tokens.d.ts} +1 -1
  36. package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-transaction-arguments.d.ts +2 -0
  37. package/core-kit/hooks/trading/index.d.ts +1 -3
  38. package/core-kit/hooks/trading/use-swap-data-query.d.ts +6 -0
  39. package/core-kit/models/index.d.ts +0 -3
  40. package/core-kit/types/config.types.d.ts +1 -4
  41. package/core-kit/types/state.types.d.ts +8 -13
  42. package/core-kit/types/trading-panel.types.d.ts +0 -1
  43. package/core-kit/types/trading.types.d.ts +21 -3
  44. package/core-kit/utils/transaction.d.ts +12 -0
  45. package/{index-79f679c5.js → index-8649280a.js} +12333 -12023
  46. package/index-e1549967.cjs +207 -0
  47. package/index.cjs +1 -1
  48. package/index.d.ts +6 -9
  49. package/index.js +226 -260
  50. package/package.json +1 -1
  51. package/{pyth-adapter-556efdbc.js → pyth-adapter-ac818fc3.js} +1 -1
  52. package/{pyth-adapter-a30de8f8.cjs → pyth-adapter-e6d49270.cjs} +1 -1
  53. package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +1 -0
  54. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +0 -3
  55. package/trading-widget/providers/config-provider/config-provider.types.d.ts +2 -1
  56. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -2
  57. package/core-kit/hooks/trading/deposit/index.d.ts +0 -10
  58. package/core-kit/hooks/trading/deposit/use-deposit-method-handler.d.ts +0 -2
  59. package/core-kit/hooks/trading/deposit/use-deposit-quote.d.ts +0 -2
  60. package/core-kit/hooks/trading/deposit/use-deposit-slippage.d.ts +0 -1
  61. package/core-kit/hooks/trading/deposit/use-deposit-trading-params.d.ts +0 -2
  62. package/core-kit/hooks/trading/deposit/use-pool-deposit-asset-address.d.ts +0 -9
  63. package/core-kit/hooks/trading/deposit/use-should-be-whitelisted.d.ts +0 -4
  64. package/core-kit/hooks/trading/use-handle-pool-swap-info.d.ts +0 -1
  65. package/core-kit/hooks/trading/use-is-easy-swapper-trading.d.ts +0 -1
  66. package/core-kit/hooks/trading/use-trading-price-diff.d.ts +0 -8
  67. package/core-kit/models/buying-with-easyswapper-args.d.ts +0 -18
  68. package/core-kit/models/buying-with-native-asset-args.d.ts +0 -16
  69. package/core-kit/models/buying-with-pool-logic-args.d.ts +0 -14
  70. package/index-76a2bf91.cjs +0 -207
  71. package/trading-widget/components/deposit/settings/deposit-fee-switch/deposit-fee-switch.d.ts +0 -1
  72. package/trading-widget/components/deposit/settings/deposit-fee-switch/deposit-fee-switch.hooks.d.ts +0 -5
  73. package/trading-widget/components/deposit/settings/deposit-settings/deposit-settings.hooks.d.ts +0 -6
  74. /package/core-kit/hooks/trading/{deposit → deposit-v2}/use-deposit-allowance.d.ts +0 -0
  75. /package/core-kit/hooks/trading/{deposit → deposit-v2}/use-deposit.d.ts +0 -0
  76. /package/core-kit/hooks/trading/{deposit → deposit-v2}/use-handle-pool-deposit-data.d.ts +0 -0
package/README.md CHANGED
@@ -27,6 +27,7 @@ import { TradingPanelProvider, TradingWidget } from '@dhedge/trading-widget';
27
27
 
28
28
  - Setup [Wagmi Provider](https://wagmi.sh/react/api/WagmiProvider) on top level or use existing one in your app
29
29
  - Setup [TradingPanelProvider](#tradingpanelprovider)
30
+ #### Providing a `getSwapData` callback is mandatory for depositing with off-chain swaps.
30
31
  - Setup [TradingWidget](#tradingwidget)
31
32
 
32
33
  3. Minimum required config
@@ -52,23 +53,22 @@ Top level provider component. Headless part of trading logic. API handles params
52
53
  <details>
53
54
  <summary><code>actions</code> <code><b>/</b></code> <code>Optional General callbacks to interact with 3rd party services</code></summary>
54
55
 
55
- > | name | type | default value | description |
56
- > |-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------|
57
- > | `onUpdatePoolConfigDepositMethod` | (payload: { address: `Address`; method: `'deposit' \| 'depositWithCustomCooldown'` }) => void | undefined | triggers on deposit method change |
58
- > | `onUpdateSendTokenInput` | (payload: Partial\<{ address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }\>) => void | undefined | triggers on send token change |
59
- > | `onUpdateTradingSettings` | (payload: Partial\<{ slippage: `number \| 'auto'`; minSlippage?: `number` isInfiniteAllowance: `boolean`; isMultiAssetWithdrawalEnabled: `boolean`; isMaxSlippageLoading: `boolean` }\>) => void | undefined | triggers on trading settings change |
60
- > | `onSetTradingType` | (payload: `'deposit' \| 'withdraw'`) => void | undefined | triggers on trading type change |
61
- > | `onUpdateTradingMeta` | (payload: Partial\<{ approvingStatus: `'pending' \| 'success'` }\>) => void | undefined | triggers on trading meta change |
62
- > | `onUpdateTradingModal` | (payload: Partial\<{ isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'` }\>) => void | undefined | triggers on trading modal change |
63
- > | `onUpdateTransactions` | (payload: AddTransaction \| UpdateTransaction \| RemoveTransaction) => void | undefined | triggers on transaction action change |
64
- > | `onUpdateEntryFee` | (payload: Partial\<Record<DepositMethodName, number>\>) => void | undefined | triggers on transaction action change |
65
- > | `onTradingSettleError` | (error: `Error`) => void | undefined | triggers on trading settle error |
66
- > | `onTransactionError` | (error: `Error`, action: `TransactionAction` \| `undefined`, chainId?: `ChainId`, txHash?: `Address`) => void | undefined | triggers on transaction error |
67
- > | `onTransactionSuccess` | (data: `WaitForTransactionReceiptReturnType`, action: `TransactionAction` \| `undefined`, link?: `string`) => void | undefined | triggers on transaction success |
68
- > | `onTransactionEstimationError` | (error: `EstimationError`, address: `Address`, chainId?: `ChainId`, account?: `Address`) => void | undefined | triggers on transaction estimation error |
69
- > | `onTokenSelector` | (payload: { isOpen: `boolean`; entity: `'token' \| 'pool'` }) => void | undefined | triggers on token selector change |
70
- > | `onLog` | (eventName: `string`, payload?: `Record<string, unknown>`) => void | undefined | triggers on log event |
71
- > | `onSimulateTransaction` | (payload: { chainId: `ChainId`; from: `Address`: to: `Address`; input: `string`; gas: `number`; value?: `string` }) => Promise<{ link?: `string`; simulation: { status: `boolean`; error_message: `string` } } \| null> | undefined | triggers to simulate transaction and get error details after failed tx estimation |
56
+ > | name | type | default value | description |
57
+ > |---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|------------------------------------------------------------------------------------|
58
+ > | `onUpdateSendTokenInput` | (payload: Partial\<{ address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }\>) => void | undefined | triggers on send token change |
59
+ > | `onUpdateTradingSettings` | (payload: Partial\<{ slippage: `number \| 'auto'`; minSlippage?: `number` isInfiniteAllowance: `boolean`; isMultiAssetWithdrawalEnabled: `boolean`; isMaxSlippageLoading: `boolean` }\>) => void | undefined | triggers on trading settings change |
60
+ > | `onSetTradingType` | (payload: `'deposit' \| 'withdraw'`) => void | undefined | triggers on trading type change |
61
+ > | `onUpdateTradingMeta` | (payload: Partial\<{ approvingStatus: `'pending' \| 'success'` }\>) => void | undefined | triggers on trading meta change |
62
+ > | `onUpdateTradingModal` | (payload: Partial\<{ isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'` }\>) => void | undefined | triggers on trading modal change |
63
+ > | `onUpdateTransactions` | (payload: AddTransaction \| UpdateTransaction \| RemoveTransaction) => void | undefined | triggers on transaction action change |
64
+ > | `onTradingSettleError` | (error: `Error`) => void | undefined | triggers on trading settle error |
65
+ > | `onTransactionError` | (error: `Error`, action: `TransactionAction` \| `undefined`, chainId?: `ChainId`, txHash?: `Address`) => void | undefined | triggers on transaction error |
66
+ > | `onTransactionSuccess` | (data: `WaitForTransactionReceiptReturnType`, action: `TransactionAction` \| `undefined`, link?: `string`) => void | undefined | triggers on transaction success |
67
+ > | `onTransactionEstimationError` | (error: `EstimationError`, address: `Address`, chainId?: `ChainId`, account?: `Address`) => void | undefined | triggers on transaction estimation error |
68
+ > | `onTokenSelector` | (payload: { isOpen: `boolean`; entity: `'token' \| 'pool'` }) => void | undefined | triggers on token selector change |
69
+ > | `onLog` | (eventName: `string`, payload?: `Record<string, unknown>`) => void | undefined | triggers on log event |
70
+ > | `onSimulateTransaction` | (payload: { chainId: `ChainId`; from: `Address`: to: `Address`; input: `string`; gas: `number`; value?: `string` }) => Promise<{ link?: `string`; simulation: { status: `boolean`; error_message: `string` } } \| null> | undefined | triggers to simulate transaction and get error details after failed tx estimation |
71
+ > | `getSwapData` | ({ signal: `AbortSignal`, variables: { chainId: `number`; sourceAddress: `Address`; destinationAddress: `Address`; walletAddress: `Address`; fromAddress: `Address`; amount: `string`; slippage: `string` } }) => Promise<{ destinationAmount: `string`; txData: `string` ; routerKey: `'ONE_INCH' / 'ONE_INCH_V5' / 'ZERO_X' / 'PARASWAP'` } } \| null> | undefined | provides off chain swap data based on send token value |
72
72
 
73
73
  ###### Source: `packages/trading-widget/src/core-kit/providers/index.tsx`
74
74
  ###### Default values: `undefined`
@@ -106,21 +106,23 @@ UI configuration provider. Manages params to configure custom styling, component
106
106
 
107
107
  ##### params
108
108
 
109
- > | name | type | default value | description |
110
- > |-------------------------------------|-----------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
111
- > | `isGeoBlocked` | `boolean` | `false` | Restricts depositing action button and conditionally renders GeoBlockAlert component |
112
- > | `isSanctioned` | `boolean` | `false` | Restricts depositing action button and conditionally renders SanctionedAlert component |
113
- > | `depositQuoteDiffWarningThreshold` | `number` | `1` | Deposit slippage absolute percent value warning threshold, Affects styling to warn user |
114
- > | `depositQuoteDiffErrorThreshold` | `number` | `3` | Deposit slippage absolute percent value error threshold, Affects styling to warn user |
115
- > | `defaultWithdrawSlippageScale` | `number[]` | `[0.1, 0.3, 0.5, 1, 1.5, 3]` | Initial withdraw slippage absolute percent. Further adjustments are available in panel settings |
116
- > | `defaultLockTime` | `string` | `'24 hours'` | Formatted default deposit lock time to be displayed in panel (Long lockup period is used for PoolLogic abi trading methods and can be managed in panel settings) |
117
- > | `chainCustomLockTimeMap` | `Record<ChainId, string>` | `{ [chainId]: '60 minutes' }` | Formatted custom deposit lock time per chain for EasySwapper abi trading methods to be displayed in panel |
118
- > | `stablePrecision` | `number` | `3` | Number of decimals to be displayed in stables (e.g USDC balance) |
119
- > | `defaultPrecision` | `number` | `6` | Number of decimals to be displayed in token values |
120
- > | `stakingChainId` | `number` | `10` (Optimism) | ChainId to be used in staking logic |
121
- > | `termsOfUseAccepted` | `boolean` | `true` | Requires user to confirm terms of use by rendering DepositTermsOfUse component before deposit action |
122
- > | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
123
- > | `chainConfig` | `Partial<Record<ChainId, { name: string; iconPath: string }>>` | `{}` | Sets map of chain `name` and `iconPath` |
109
+ > | name | type | default value | description |
110
+ > |----------------------------------------|----------------------------------------------------------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
111
+ > | `isGeoBlocked` | `boolean` | `false` | Restricts depositing action button and conditionally renders GeoBlockAlert component |
112
+ > | `isSanctioned` | `boolean` | `false` | Restricts depositing action button and conditionally renders SanctionedAlert component |
113
+ > | `depositQuoteDiffWarningThreshold` | `number` | `1` | Deposit slippage absolute percent value warning threshold, Affects styling to warn user |
114
+ > | `depositQuoteDiffErrorThreshold` | `number` | `3` | Deposit slippage absolute percent value error threshold, Affects styling to warn user |
115
+ > | `defaultWithdrawSlippageScale` | `number[]` | `[0.1, 0.3, 0.5, 1, 1.5, 3]` | Initial withdraw slippage absolute percent. Further adjustments are available in panel settings |
116
+ > | `defaultSwapTransactionSlippage` | `number` | `0.3` | Default slippage (%) applied to swap transaction. |
117
+ > | `defaultNoSwapMinDepositAmountGap` | `number` | `0.1` | Default gap (%) for min received vault tokens during no swap deposits. |
118
+ > | `defaultLockTime` | `string` | `'24 hours'` | Formatted default deposit lock time to be displayed in panel (Long lockup period is used to bypass entry fee and can be managed in panel settings) |
119
+ > | `customLockTime` | `string` | `'15 minutes'` | Formatted custom deposit lock time alternative to be displayed in panel |
120
+ > | `stablePrecision` | `number` | `3` | Number of decimals to be displayed in stables (e.g USDC balance) |
121
+ > | `defaultPrecision` | `number` | `6` | Number of decimals to be displayed in token values |
122
+ > | `stakingChainId` | `number` | `10` (Optimism) | ChainId to be used in staking logic |
123
+ > | `termsOfUseAccepted` | `boolean` | `true` | Requires user to confirm terms of use by rendering DepositTermsOfUse component before deposit action |
124
+ > | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
125
+ > | `chainConfig` | `Partial<Record<ChainId, { name: string; iconPath: string }>>` | `{}` | Sets map of chain `name` and `iconPath` |
124
126
 
125
127
  ##### actions
126
128
 
@@ -414,84 +416,82 @@ path: `component.meta[name]`
414
416
  <code>Translation keys</code>
415
417
  </summary>
416
418
 
417
- > | name | type | default value | description |
418
- > |-----------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
419
- > | `depositSlippageWarning` | string | Includes entry fee. We recommend 2-3%, but usually it will be < 1%. Slippage may be amplified by the leverage. See the docs for more info. | |
420
- > | `withdrawSlippageWarning` | string | Slippage only applies to single asset withdrawals and withdrawals from vaults with debt positions in Aave. | |
421
- > | `minSlippageWarning` | string | Flexible min slippage value that is likely enough to process the transaction. | |
422
- > | `highSlippageWarning` | string | We recommend using another asset to trade with lower slippage. | |
423
- > | `recommendedMinSlippage` | string | Recommended Min Slippage | |
424
- > | `projectedDailyEarningsTooltip` | string | Projected daily earnings are based on the current APY and may differ from actual earnings. | |
425
- > | `dailyEarnings` | string | Daily Earnings | |
426
- > | `projectedYearlyEarningsTooltip` | string | Projected yearly earnings are based on the current APY and may differ from actual earnings. | |
427
- > | `yearlyEarnings` | string | Yearly Earnings | |
428
- > | `fullReceiveDetails` | string | See full details influencing what you will receive. | |
429
- > | `tradeDetails` | string | Trade details | |
430
- > | `maxSlippage` | string | Max slippage | |
431
- > | `minReceiveAmount` | string | You will receive no less than this amount. | |
432
- > | `minReceived` | string | Minimum Received | |
433
- > | `estimatedMultiAssetFractions` | string | Estimated multi asset fractions | |
434
- > | `infinite` | string | Infinite | |
435
- > | `tokenAllowance` | string | Token Allowance | |
436
- > | `entryFee` | string | Entry Fee | |
437
- > | `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. | |
438
- > | `easySwapperEntryFee` | string | Entry fee is charged when a cooldown of {time} is selected. Bypass Entry Fee at trading settings. | |
439
- > | `amountToBeApproved` | string | Amount of {symbol} tokens to be approved. Can be customized in settings. | |
440
- > | `minDepositUsd` | string | Minimum deposit in USD. | |
441
- > | `minDeposit` | string | Minimum Deposit | |
442
- > | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
443
- > | `slippageTolerance` | string | Slippage tolerance | |
444
- > | `bypassEntryFee` | string | Bypass Entry Fee | |
445
- > | `entryFeeSwitchWarning` | string | By removing the entry fee, your position is locked for up to {defaultLockTime} instead of the normal {customLockTime}. | |
446
- > | `tokenAmountToApprove` | string | Amount of tokens to be approved. | |
447
- > | `auto` | string | Auto | |
448
- > | `autoSlippageDescription` | string | App is testing different slippage ranges, starting low and increasing until it's likely to pass | |
449
- > | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
450
- > | `deposit` | string | Buy | |
451
- > | `withdraw` | string | Sell | |
452
- > | `yourBalance` | string | Your Balance | |
453
- > | `max` | string | Max | |
454
- > | `allAssets` | string | All Assets | |
455
- > | `all` | string | All | |
456
- > | `payWith` | string | Pay with | |
457
- > | `buyEstimated` | string | Buy (estimated) | |
458
- > | `sell` | string | Sell | |
459
- > | `receiveEstimated` | string | Receive (estimated) | |
460
- > | `confirmInWallet` | string | Please confirm in wallet | |
461
- > | `pending` | string | Pending... | |
462
- > | `approve` | string | Approve | |
463
- > | `connectWallet` | string | Connect Wallet | |
464
- > | `minimumPurchase` | string | Minimum purchase is ${value} | |
465
- > | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
466
- > | `poolIsPrivate` | string | This vault is currently private | |
467
- > | `updateOracles` | string | Update Oracles | |
468
- > | `checkingOracles` | string | Checking Oracles | |
469
- > | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
470
- > | `withdrawalWindowDisabled` | string | You can sell your {tokenSymbol} tokens during withdrawal window period starting from {startTime} | |
471
- > | `withdrawCooldown` | string | You can sell your {tokenSymbol} tokens in {cooldownEndTime} | |
472
- > | `termsOfUse` | string | Terms Of Use | |
473
- > | `termOfUseDepositListTitle` | string | Please know the following before depositing | |
474
- > | `termOfUseDepositAssetSlippage` | string | When exiting, investors receive single asset or the underlying vault assets. Withdraw slippage can be customized in withdraw settings | |
475
- > | `termOfUseDepositBugs` | string | There may be interface bugs on the platform | |
476
- > | `termOfUseDepositDowntime` | string | There may be interface downtime (planned and unplanned) | |
477
- > | `termOfUseDepositAuditRisk` | string | Smart contracts are audited but a risk is still present | |
478
- > | `termOfUseDepositAccept` | string | Accept & Deposit | |
479
- > | `back` | string | Back | |
480
- > | `highSlippage` | string | High Slippage Alert | |
481
- > | `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. | |
482
- > | `highSlippageListTitle` | string | Please consider the following before confirming | |
483
- > | `highSlippageQuoteDiff` | string | Be aware that the final amount of assets you receive may be different from the initially quoted value. | |
484
- > | `highSlippageRisk` | string | Ensure that you understand the risks associated with high slippage and are comfortable proceeding with the trade. | |
485
- > | `confirm` | string | Confirm | |
486
- > | `selectToken` | string | Select Token | |
487
- > | `sendingOrderToWallet` | string | Sending order to your wallet | |
488
- > | `settingUpTx` | string | Setting up transaction | |
489
- > | `updateSynthetixOracles` | string | Updating Synthetix Oracles | |
490
- > | `approveSpending` | string | Approve {symbol} spending | |
491
- > | `pay` | string | Pay | |
492
- > | `multiAssetFractions` | string | multi asset fractions | |
493
- > | `explorer` | string | Explorer | |
494
- > | `as` | string | As | |
419
+ > | name | type | default value | description |
420
+ > |----------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
421
+ > | `depositSlippageWarning` | string | Excludes entry fee. Slippage may be amplified by the leverage. See the docs for more info. | |
422
+ > | `withdrawSlippageWarning` | string | Slippage only applies to single asset withdrawals and withdrawals from vaults with debt positions in Aave. | |
423
+ > | `minSlippageWarning` | string | Flexible min slippage value that is likely enough to process the transaction. | |
424
+ > | `highSlippageWarning` | string | We recommend using another asset to trade with lower slippage. | |
425
+ > | `recommendedMinSlippage` | string | Recommended Min Slippage | |
426
+ > | `projectedDailyEarningsTooltip` | string | Projected daily earnings are based on the current APY and may differ from actual earnings. | |
427
+ > | `dailyEarnings` | string | Daily Earnings | |
428
+ > | `projectedYearlyEarningsTooltip` | string | Projected yearly earnings are based on the current APY and may differ from actual earnings. | |
429
+ > | `yearlyEarnings` | string | Yearly Earnings | |
430
+ > | `fullReceiveDetails` | string | See full details influencing what you will receive. | |
431
+ > | `tradeDetails` | string | Trade details | |
432
+ > | `maxSlippage` | string | Max slippage | |
433
+ > | `minReceiveAmount` | string | You will receive no less than this amount. | |
434
+ > | `minReceived` | string | Minimum Received | |
435
+ > | `estimatedMultiAssetFractions` | string | Estimated multi asset fractions | |
436
+ > | `infinite` | string | Infinite | |
437
+ > | `tokenAllowance` | string | Token Allowance | |
438
+ > | `entryFee` | string | Entry Fee | |
439
+ > | `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. | |
440
+ > | `amountToBeApproved` | string | Amount of {symbol} tokens to be approved. Can be customized in settings. | |
441
+ > | `minDepositUsd` | string | Minimum deposit in USD. | |
442
+ > | `minDeposit` | string | Minimum Deposit | |
443
+ > | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
444
+ > | `slippageTolerance` | string | Slippage tolerance | |
445
+ > | `bypassEntryFee` | string | Bypass Entry Fee | |
446
+ > | `tokenAmountToApprove` | string | Amount of tokens to be approved. | |
447
+ > | `auto` | string | Auto | |
448
+ > | `autoSlippageDescription` | string | App is testing different slippage ranges, starting low and increasing until it's likely to pass | |
449
+ > | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
450
+ > | `deposit` | string | Buy | |
451
+ > | `withdraw` | string | Sell | |
452
+ > | `yourBalance` | string | Your Balance | |
453
+ > | `max` | string | Max | |
454
+ > | `allAssets` | string | All Assets | |
455
+ > | `all` | string | All | |
456
+ > | `payWith` | string | Pay with | |
457
+ > | `buyEstimated` | string | Buy (estimated) | |
458
+ > | `sell` | string | Sell | |
459
+ > | `receiveEstimated` | string | Receive (estimated) | |
460
+ > | `confirmInWallet` | string | Please confirm in wallet | |
461
+ > | `pending` | string | Pending... | |
462
+ > | `approve` | string | Approve | |
463
+ > | `connectWallet` | string | Connect Wallet | |
464
+ > | `minimumPurchase` | string | Minimum purchase is ${value} | |
465
+ > | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
466
+ > | `poolIsPrivate` | string | This vault is currently private | |
467
+ > | `updateOracles` | string | Update Oracles | |
468
+ > | `checkingOracles` | string | Checking Oracles | |
469
+ > | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
470
+ > | `withdrawalWindowDisabled` | string | You can sell your {tokenSymbol} tokens during withdrawal window period starting from {startTime} | |
471
+ > | `withdrawCooldown` | string | You can sell your {tokenSymbol} tokens in {cooldownEndTime} | |
472
+ > | `termsOfUse` | string | Terms Of Use | |
473
+ > | `termOfUseDepositListTitle` | string | Please know the following before depositing | |
474
+ > | `termOfUseDepositAssetSlippage` | string | When exiting, investors receive single asset or the underlying vault assets. Withdraw slippage can be customized in withdraw settings | |
475
+ > | `termOfUseDepositBugs` | string | There may be interface bugs on the platform | |
476
+ > | `termOfUseDepositDowntime` | string | There may be interface downtime (planned and unplanned) | |
477
+ > | `termOfUseDepositAuditRisk` | string | Smart contracts are audited but a risk is still present | |
478
+ > | `termOfUseDepositAccept` | string | Accept & Deposit | |
479
+ > | `back` | string | Back | |
480
+ > | `highSlippage` | string | High Slippage Alert | |
481
+ > | `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. | |
482
+ > | `highSlippageListTitle` | string | Please consider the following before confirming | |
483
+ > | `highSlippageQuoteDiff` | string | Be aware that the final amount of assets you receive may be different from the initially quoted value. | |
484
+ > | `highSlippageRisk` | string | Ensure that you understand the risks associated with high slippage and are comfortable proceeding with the trade. | |
485
+ > | `confirm` | string | Confirm | |
486
+ > | `selectToken` | string | Select Token | |
487
+ > | `sendingOrderToWallet` | string | Sending order to your wallet | |
488
+ > | `settingUpTx` | string | Setting up transaction | |
489
+ > | `updateSynthetixOracles` | string | Updating Synthetix Oracles | |
490
+ > | `approveSpending` | string | Approve {symbol} spending | |
491
+ > | `pay` | string | Pay | |
492
+ > | `multiAssetFractions` | string | multi asset fractions | |
493
+ > | `explorer` | string | Explorer | |
494
+ > | `as` | string | As | |
495
495
 
496
496
  ###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
497
497
  ###### Default values: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.defaults.ts`