@dhedge/trading-widget 1.2.1 → 1.2.4
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 +0 -2
- package/core-kit/abi/pool-manager-logic.d.ts +4 -0
- package/core-kit/hooks/pool/multicall/use-pool-manager.dynamic.d.ts +4 -0
- package/core-kit/hooks/pool/multicall/use-pool-manager.static.d.ts +9 -1
- package/core-kit/hooks/pool/use-pool-dynamic-contract-data.d.ts +1 -0
- package/core-kit/hooks/pool/use-pool-fees.d.ts +2 -0
- package/core-kit/hooks/pool/use-pool-manager-logic-data.d.ts +2 -0
- package/core-kit/hooks/trading/deposit/index.d.ts +1 -0
- package/core-kit/hooks/trading/{use-trading-params.d.ts → deposit/use-deposit-trading-params.d.ts} +1 -1
- package/core-kit/hooks/trading/index.d.ts +0 -1
- package/core-kit/hooks/trading/withdraw/index.d.ts +1 -0
- package/core-kit/hooks/trading/withdraw/use-withdraw-trading-params.d.ts +2 -0
- package/core-kit/types/config.types.d.ts +4 -0
- package/core-kit/types/trading.types.d.ts +1 -1
- package/core-kit/types/web3.types.d.ts +1 -0
- package/{index-280417b7.js → index-78ec0001.js} +8378 -8317
- package/index-8bf309ac.cjs +207 -0
- package/index.cjs +1 -1
- package/index.d.ts +3 -3
- package/index.js +97 -96
- package/package.json +1 -1
- package/{pyth-adapter-2a7a0071.cjs → pyth-adapter-0e4bd6c4.cjs} +1 -1
- package/{pyth-adapter-f54183bb.js → pyth-adapter-78b211e0.js} +1 -1
- package/style.css +1 -1
- package/trading-widget/components/withdraw/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +1 -0
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +0 -2
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +2 -0
- package/index-580788f2.cjs +0 -207
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 |
|
|
@@ -44,6 +44,10 @@ export declare const PoolManagerLogicAbi: readonly [{
|
|
|
44
44
|
readonly internalType: "uint256";
|
|
45
45
|
readonly name: "";
|
|
46
46
|
readonly type: "uint256";
|
|
47
|
+
}, {
|
|
48
|
+
readonly internalType: "uint256";
|
|
49
|
+
readonly name: "";
|
|
50
|
+
readonly type: "uint256";
|
|
47
51
|
}];
|
|
48
52
|
readonly stateMutability: "view";
|
|
49
53
|
readonly type: "function";
|
|
@@ -47,6 +47,10 @@ export declare const usePoolManagerDynamic: ({ address, chainId, }: PoolContract
|
|
|
47
47
|
readonly internalType: "uint256";
|
|
48
48
|
readonly name: "";
|
|
49
49
|
readonly type: "uint256";
|
|
50
|
+
}, {
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
readonly name: "";
|
|
53
|
+
readonly type: "uint256";
|
|
50
54
|
}];
|
|
51
55
|
readonly stateMutability: "view";
|
|
52
56
|
readonly type: "function";
|
|
@@ -47,6 +47,10 @@ export declare const usePoolManagerStatic: ({ address, chainId, }: PoolContractC
|
|
|
47
47
|
readonly internalType: "uint256";
|
|
48
48
|
readonly name: "";
|
|
49
49
|
readonly type: "uint256";
|
|
50
|
+
}, {
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
readonly name: "";
|
|
53
|
+
readonly type: "uint256";
|
|
50
54
|
}];
|
|
51
55
|
readonly stateMutability: "view";
|
|
52
56
|
readonly type: "function";
|
|
@@ -121,6 +125,10 @@ export declare const usePoolManagerStatic: ({ address, chainId, }: PoolContractC
|
|
|
121
125
|
readonly internalType: "uint256";
|
|
122
126
|
readonly name: "";
|
|
123
127
|
readonly type: "uint256";
|
|
128
|
+
}, {
|
|
129
|
+
readonly internalType: "uint256";
|
|
130
|
+
readonly name: "";
|
|
131
|
+
readonly type: "uint256";
|
|
124
132
|
}];
|
|
125
133
|
readonly stateMutability: "view";
|
|
126
134
|
readonly type: "function";
|
|
@@ -148,6 +156,6 @@ export declare const usePoolManagerStatic: ({ address, chainId, }: PoolContractC
|
|
|
148
156
|
readonly functionName: "minDepositUSD";
|
|
149
157
|
readonly chainId: number;
|
|
150
158
|
}], true, {
|
|
151
|
-
getFeeIncreaseInfo: readonly [bigint, bigint, bigint, bigint] | undefined;
|
|
159
|
+
getFeeIncreaseInfo: readonly [bigint, bigint, bigint, bigint, bigint] | undefined;
|
|
152
160
|
minDepositUSD: bigint | undefined;
|
|
153
161
|
}>;
|
|
@@ -13,6 +13,7 @@ export declare const usePoolDynamicContractData: ({ address, chainId, }: PoolDyn
|
|
|
13
13
|
performanceFee?: string | undefined;
|
|
14
14
|
streamingFee?: string | undefined;
|
|
15
15
|
entryFee?: string | undefined;
|
|
16
|
+
exitFee?: string | undefined;
|
|
16
17
|
cooldownActive: boolean;
|
|
17
18
|
cooldownEndsInTime: string;
|
|
18
19
|
};
|
|
@@ -3,6 +3,7 @@ export declare const normalizeFeeIncreaseInfo: (feeIncreaseInfo?: readonly bigin
|
|
|
3
3
|
announcedPerformanceFee: string;
|
|
4
4
|
announcedStreamingFee: string;
|
|
5
5
|
announcedEntryFee: string;
|
|
6
|
+
announcedExitFee: string;
|
|
6
7
|
announcedTimestamp: string;
|
|
7
8
|
};
|
|
8
9
|
export declare const usePoolManagerLogicData: (poolAddress: Address, chainId: ChainId) => {
|
|
@@ -10,5 +11,6 @@ export declare const usePoolManagerLogicData: (poolAddress: Address, chainId: Ch
|
|
|
10
11
|
announcedPerformanceFee: string;
|
|
11
12
|
announcedStreamingFee: string;
|
|
12
13
|
announcedEntryFee: string;
|
|
14
|
+
announcedExitFee: string;
|
|
13
15
|
announcedTimestamp: string;
|
|
14
16
|
};
|
|
@@ -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';
|
package/core-kit/hooks/trading/{use-trading-params.d.ts → deposit/use-deposit-trading-params.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TradingParams } from 'core-kit/types/trading.types';
|
|
2
|
-
export declare const
|
|
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';
|
|
@@ -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
|
-
|
|
7
|
+
receiveAssetAmount: string;
|
|
8
8
|
poolDepositAddress?: Address;
|
|
9
9
|
receiveAssetAddress: Address;
|
|
10
10
|
}
|