@dhedge/trading-widget 1.1.6 → 1.2.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.
package/README.md CHANGED
@@ -112,8 +112,6 @@ UI configuration provider. Manages params to configure custom styling, component
112
112
  > | `isSanctioned` | `boolean` | `false` | Restricts depositing action button and conditionally renders SanctionedAlert component |
113
113
  > | `depositQuoteDiffWarningThreshold` | `number` | `1` | Deposit slippage absolute percent value warning threshold, Affects styling to warn user |
114
114
  > | `depositQuoteDiffErrorThreshold` | `number` | `3` | Deposit slippage absolute percent value error threshold, Affects styling to warn user |
115
- > | `defaultDepositSlippage` | `number` | `0` | Initial deposit slippage absolute percent. Further adjustments are available in panel settings |
116
- > | `defaultDepositSlippageScale` | `number[]` | `[0]` | Initial deposit slippage absolute percent. Further adjustments are available in panel settings |
117
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 |
118
116
  > | `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
117
  > | `customLockTime` | `string` | `'15 minutes'` | Formatted custom deposit lock time alternative to be displayed in panel |
@@ -1,3 +1,5 @@
1
1
  import type { Address, ChainId } from '../types';
2
2
  export declare const FLATMONEY_LEVERAGED_RETH_ASSET_MAP: Record<ChainId, Address>;
3
3
  export declare const FLATMONEY_COLLATERAL_SYMBOL_MAP: Record<ChainId, string>;
4
+ export declare const FLATMONEY_UNIT_SYMBOL_MAP: Record<ChainId, string>;
5
+ export declare const FLATMONEY_UNIT_ADDRESS_MAP: Record<ChainId, Address>;
@@ -1 +1,2 @@
1
1
  export declare const PYTH_API_LINK = "https://hermes.pyth.network";
2
+ export declare const FLAT_MONEY_UNIT_LINK = "https://flat.money/flatcoin";
@@ -7,3 +7,4 @@ export { useDepositQuote } from './use-deposit-quote';
7
7
  export { usePoolDepositAssetAddress } from './use-pool-deposit-asset-address';
8
8
  export { usePoolDepositTokens } from './use-pool-deposit-tokens';
9
9
  export { useHandlePoolDepositData } from './use-handle-pool-deposit-data';
10
+ export { useDepositTradingParams } from './use-deposit-trading-params';
@@ -1,2 +1,2 @@
1
1
  import type { TradingParams } from 'core-kit/types/trading.types';
2
- export declare const useTradingParams: () => TradingParams;
2
+ export declare const useDepositTradingParams: () => TradingParams;
@@ -5,7 +5,6 @@ export { useTradingPriceDiff } from './use-trading-price-diff';
5
5
  export { useAssetPrice } from './use-asset-price';
6
6
  export { useRawAssetPrice } from './use-raw-asset-price';
7
7
  export { useIsTradingEnabled } from './use-is-trading-enabled';
8
- export { useTradingParams } from './use-trading-params';
9
8
  export { useExchangeRate } from './use-exchange-rate';
10
9
  export { useHandleTrade } from './use-handle-trade';
11
10
  export { useMinReceiveText } from './use-min-receive-text';
@@ -4,3 +4,4 @@ export { useWithdrawAllowance } from './use-withdraw-allowance';
4
4
  export { useWithdrawSlippage } from './use-withdraw-slippage';
5
5
  export { useWithdrawTypeHandler } from './use-withdraw-type-handler';
6
6
  export { useWithdrawQuote } from './use-withdraw-quote';
7
+ export { useWithdrawTradingParams } from './use-withdraw-trading-params';
@@ -0,0 +1,2 @@
1
+ import type { TradingParams } from 'core-kit/types/trading.types';
2
+ export declare const useWithdrawTradingParams: () => Omit<TradingParams, 'poolDepositAddress'>;
@@ -4,7 +4,7 @@ import type { Address, ChainId } from 'core-kit/types/web3.types';
4
4
  export interface TradingParams {
5
5
  sendAssetAddress: Address;
6
6
  fromTokenAmount: BigNumber;
7
- receiveAssetInputValue: string;
7
+ receiveAssetAmount: string;
8
8
  poolDepositAddress?: Address;
9
9
  receiveAssetAddress: Address;
10
10
  }
@@ -1,3 +1,4 @@
1
1
  import type { Address } from 'viem';
2
2
  export declare const isFlatMoneyEarlyDepositorAddress: (address: Address) => boolean;
3
3
  export declare const isFlatMoneyLeveragedRethAsset: (address: Address) => boolean;
4
+ export declare const getFlatMonetUnitSymbol: (chainId: number) => string;