@orderly.network/ui-transfer 3.1.9 → 3.1.10
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/dist/index.d.mts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +494 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +498 -45
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +14 -14
package/dist/index.d.mts
CHANGED
|
@@ -269,6 +269,26 @@ type TransferFormWidgetProps = TransferFormScriptOptions;
|
|
|
269
269
|
declare const TransferFormWidget: (props: TransferFormWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
270
270
|
declare const TransferWidget: FC<TransferFormWidgetProps>;
|
|
271
271
|
|
|
272
|
+
type ConvertHistoryStatus = "completed" | "succeeded" | "pending" | "failed" | "cancelled";
|
|
273
|
+
interface ConvertHistoryTransaction {
|
|
274
|
+
converted_asset: string;
|
|
275
|
+
converted_qty: number;
|
|
276
|
+
received_asset: string;
|
|
277
|
+
received_qty: number;
|
|
278
|
+
result?: string;
|
|
279
|
+
}
|
|
280
|
+
interface ConvertHistoryRecord {
|
|
281
|
+
convert_id: number;
|
|
282
|
+
converted_asset?: Record<string, number> | null;
|
|
283
|
+
received_asset: string;
|
|
284
|
+
received_qty: number;
|
|
285
|
+
type: "auto" | "manual";
|
|
286
|
+
status: ConvertHistoryStatus;
|
|
287
|
+
created_time: number;
|
|
288
|
+
details: ConvertHistoryTransaction[];
|
|
289
|
+
}
|
|
290
|
+
declare const getEffectiveConvertStatus: (record: Pick<ConvertHistoryRecord, "status" | "details">) => ConvertHistoryStatus;
|
|
291
|
+
|
|
272
292
|
type ConvertFormScriptReturn = ReturnType<typeof useConvertFormScript>;
|
|
273
293
|
interface ConvertFormScriptOptions {
|
|
274
294
|
token?: string;
|
|
@@ -304,7 +324,7 @@ declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
|
|
|
304
324
|
hasPositions: boolean;
|
|
305
325
|
onSettlePnl: () => Promise<any>;
|
|
306
326
|
networkId: NetworkId;
|
|
307
|
-
slippage:
|
|
327
|
+
slippage: number;
|
|
308
328
|
onSlippageChange: (value: number) => void;
|
|
309
329
|
convertRate: string;
|
|
310
330
|
minimumReceived: string;
|
|
@@ -312,6 +332,20 @@ declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
|
|
|
312
332
|
isQuoteLoading: boolean;
|
|
313
333
|
currentLTV: number;
|
|
314
334
|
nextLTV: number;
|
|
335
|
+
activeConvertRequest: {
|
|
336
|
+
status: ConvertHistoryStatus | undefined;
|
|
337
|
+
sourceToken: string;
|
|
338
|
+
sourceAmount: string;
|
|
339
|
+
targetToken: string;
|
|
340
|
+
targetAmount: string;
|
|
341
|
+
receivedAmount: string;
|
|
342
|
+
isDelayed: boolean;
|
|
343
|
+
} | undefined;
|
|
344
|
+
isRecoveredConvertRequest: boolean;
|
|
345
|
+
isCheckingConvertStatus: boolean;
|
|
346
|
+
hasConvertStatusError: boolean;
|
|
347
|
+
isConvertHistoryRefreshing: boolean;
|
|
348
|
+
onRefreshConvertStatus: () => void;
|
|
315
349
|
};
|
|
316
350
|
|
|
317
351
|
type ConvertFormProps = ConvertFormScriptReturn;
|
|
@@ -513,4 +547,4 @@ declare const DepositStatus: react__default.FC<DepositStatusProps>;
|
|
|
513
547
|
type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
|
|
514
548
|
declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
|
|
515
549
|
|
|
516
|
-
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, type DepositTabExtension, ExchangeDivider, Fee, InjectableDepositAndWithdraw, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
|
550
|
+
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type ConvertHistoryRecord, type ConvertHistoryStatus, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, type DepositTabExtension, ExchangeDivider, Fee, InjectableDepositAndWithdraw, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getEffectiveConvertStatus, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
package/dist/index.d.ts
CHANGED
|
@@ -269,6 +269,26 @@ type TransferFormWidgetProps = TransferFormScriptOptions;
|
|
|
269
269
|
declare const TransferFormWidget: (props: TransferFormWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
270
270
|
declare const TransferWidget: FC<TransferFormWidgetProps>;
|
|
271
271
|
|
|
272
|
+
type ConvertHistoryStatus = "completed" | "succeeded" | "pending" | "failed" | "cancelled";
|
|
273
|
+
interface ConvertHistoryTransaction {
|
|
274
|
+
converted_asset: string;
|
|
275
|
+
converted_qty: number;
|
|
276
|
+
received_asset: string;
|
|
277
|
+
received_qty: number;
|
|
278
|
+
result?: string;
|
|
279
|
+
}
|
|
280
|
+
interface ConvertHistoryRecord {
|
|
281
|
+
convert_id: number;
|
|
282
|
+
converted_asset?: Record<string, number> | null;
|
|
283
|
+
received_asset: string;
|
|
284
|
+
received_qty: number;
|
|
285
|
+
type: "auto" | "manual";
|
|
286
|
+
status: ConvertHistoryStatus;
|
|
287
|
+
created_time: number;
|
|
288
|
+
details: ConvertHistoryTransaction[];
|
|
289
|
+
}
|
|
290
|
+
declare const getEffectiveConvertStatus: (record: Pick<ConvertHistoryRecord, "status" | "details">) => ConvertHistoryStatus;
|
|
291
|
+
|
|
272
292
|
type ConvertFormScriptReturn = ReturnType<typeof useConvertFormScript>;
|
|
273
293
|
interface ConvertFormScriptOptions {
|
|
274
294
|
token?: string;
|
|
@@ -304,7 +324,7 @@ declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
|
|
|
304
324
|
hasPositions: boolean;
|
|
305
325
|
onSettlePnl: () => Promise<any>;
|
|
306
326
|
networkId: NetworkId;
|
|
307
|
-
slippage:
|
|
327
|
+
slippage: number;
|
|
308
328
|
onSlippageChange: (value: number) => void;
|
|
309
329
|
convertRate: string;
|
|
310
330
|
minimumReceived: string;
|
|
@@ -312,6 +332,20 @@ declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
|
|
|
312
332
|
isQuoteLoading: boolean;
|
|
313
333
|
currentLTV: number;
|
|
314
334
|
nextLTV: number;
|
|
335
|
+
activeConvertRequest: {
|
|
336
|
+
status: ConvertHistoryStatus | undefined;
|
|
337
|
+
sourceToken: string;
|
|
338
|
+
sourceAmount: string;
|
|
339
|
+
targetToken: string;
|
|
340
|
+
targetAmount: string;
|
|
341
|
+
receivedAmount: string;
|
|
342
|
+
isDelayed: boolean;
|
|
343
|
+
} | undefined;
|
|
344
|
+
isRecoveredConvertRequest: boolean;
|
|
345
|
+
isCheckingConvertStatus: boolean;
|
|
346
|
+
hasConvertStatusError: boolean;
|
|
347
|
+
isConvertHistoryRefreshing: boolean;
|
|
348
|
+
onRefreshConvertStatus: () => void;
|
|
315
349
|
};
|
|
316
350
|
|
|
317
351
|
type ConvertFormProps = ConvertFormScriptReturn;
|
|
@@ -513,4 +547,4 @@ declare const DepositStatus: react__default.FC<DepositStatusProps>;
|
|
|
513
547
|
type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
|
|
514
548
|
declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
|
|
515
549
|
|
|
516
|
-
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, type DepositTabExtension, ExchangeDivider, Fee, InjectableDepositAndWithdraw, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
|
550
|
+
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type ConvertHistoryRecord, type ConvertHistoryStatus, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, type DepositTabExtension, ExchangeDivider, Fee, InjectableDepositAndWithdraw, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getEffectiveConvertStatus, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|