@dhedge/trading-widget 3.8.0 → 3.8.2

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 CHANGED
@@ -81,18 +81,18 @@ 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`; isMaxSlippageLoading: `boolean` } | { slippage: `'auto'`; isInfiniteAllowance: `false`; isMultiAssetWithdrawalEnabled: `true`; isMaxSlippageLoading: `false` } | Panel settings |
89
- > | `type` | 'deposit' \| 'withdraw' | `'deposit'` | Trading type |
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`; isMaxSlippageLoading: `boolean` } | { slippage: `'auto'`; isInfiniteAllowance: `false`; isMultiAssetWithdrawalEnabled: `true`; isMaxSlippageLoading: `false` } | Panel settings |
89
+ > | `type` | 'deposit' \| 'withdraw' | `'deposit'` | Trading type |
90
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 |
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
96
 
97
97
  ###### Source: `packages/trading-widget/src/core-kit/providers/index.tsx`
98
98
 
@@ -204,7 +204,8 @@ path: `global.color[name]`
204
204
  > | `colorTextLoading` | string | `#ffffff99` | Loading text color |
205
205
  > | `colorTextError` | string | `#EF4444` | Error text color |
206
206
  > | `colorTextWarning` | string | `#AFA58D` | Warning text color |
207
- > | `colorIcon` | string | `global?.color?.colorTextPrimary ?? #ffffff` | Warning text color |
207
+ > | `colorIcon` | string | `global?.color?.colorTextPrimary ?? #ffffff` | Icon color |
208
+ > | `colorScrollbar` | string | `#73D39380` | Scrollbar color |
208
209
 
209
210
  ###### size
210
211
 
@@ -288,13 +289,12 @@ path: `component.tabGroup[name]`
288
289
  path: `component.tabList[name]`
289
290
 
290
291
  > | name | type | default value | description |
291
- > |-----------------| ------ |--------------------------------|---------------------------|
292
+ > | --------------- | ------ | ------------------------------ | ------------------------- |
292
293
  > | `color.colorBg` | string | `#181C25` | Tab list bg color |
293
294
  > | `style.radius` | string | `global.style.radiusSecondary` | Tab list border radius |
294
295
  > | `size.px` | string | `global.size.spacer * 3` | Tab list padding inline |
295
296
  > | `size.py` | string | `global.size.spacer * 2` | Tab list padding vertical |
296
297
 
297
-
298
298
  ###### tabContent
299
299
 
300
300
  path: `component.tabContent[name]`
@@ -402,7 +402,7 @@ path: `component.tooltip[name]`
402
402
  path: `component.switch[name]`
403
403
 
404
404
  > | name | type | default value | description |
405
- > |------------------------| ------ |---------------|-----------------------------|
405
+ > | ---------------------- | ------ | ------------- | --------------------------- |
406
406
  > | `color.colorBgChecked` | string | `#152E4D` | Switch checked bg color |
407
407
  > | `color.colorBg` | string | `#4C505B` | Switch unchecked bg color |
408
408
  > | `color.color` | string | `` | Switch unchecked text color |