@orderly.network/ui-transfer 3.2.0 → 3.2.1-alpha.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.
package/dist/index.d.mts CHANGED
@@ -133,11 +133,27 @@ declare const useWithdrawFormScript: (options: WithdrawFormScriptOptions) => {
133
133
  toAccountInfo: AccountInfo | null;
134
134
  toAccountInfoDropdownOpen: boolean;
135
135
  setToAccountInfoDropdownOpen: react.Dispatch<react.SetStateAction<boolean>>;
136
+ isRobinhoodWithdrawal: boolean;
137
+ availableUSDC: number;
136
138
  walletName: string | undefined;
137
139
  address: string | undefined;
138
140
  quantity: string;
139
141
  onQuantityChange: (qty: string) => void;
140
- sourceToken: API.TokenInfo | undefined;
142
+ sourceToken: API.TokenInfo | {
143
+ precision: number | undefined;
144
+ address?: string;
145
+ base_weight: number;
146
+ decimals?: number;
147
+ token_decimal?: number;
148
+ discount_factor?: number | null;
149
+ display_name?: string;
150
+ haircut: number;
151
+ is_collateral: boolean;
152
+ symbol?: string;
153
+ user_max_qty: number;
154
+ minimum_withdraw_amount: number;
155
+ swap_enable?: boolean;
156
+ } | undefined;
141
157
  onSourceTokenChange: (this: unknown, token: API.TokenInfo) => void;
142
158
  sourceTokens: API.TokenInfo[] | {
143
159
  symbol: string;
@@ -154,6 +170,20 @@ declare const useWithdrawFormScript: (options: WithdrawFormScriptOptions) => {
154
170
  is_collateral: boolean;
155
171
  on_chain_swap: boolean;
156
172
  chain_details: API.ChainDetail[];
173
+ }[] | {
174
+ precision: number | undefined;
175
+ address?: string;
176
+ base_weight: number;
177
+ decimals?: number;
178
+ token_decimal?: number;
179
+ discount_factor?: number | null;
180
+ display_name?: string;
181
+ haircut: number;
182
+ is_collateral: boolean;
183
+ symbol?: string;
184
+ user_max_qty: number;
185
+ minimum_withdraw_amount: number;
186
+ swap_enable?: boolean;
157
187
  }[];
158
188
  inputStatus: InputStatus;
159
189
  hintMessage: string | undefined;
@@ -292,9 +322,18 @@ declare const getEffectiveConvertStatus: (record: Pick<ConvertHistoryRecord, "st
292
322
  type ConvertFormScriptReturn = ReturnType<typeof useConvertFormScript>;
293
323
  interface ConvertFormScriptOptions {
294
324
  token?: string;
325
+ /**
326
+ * Internal fixed-direction form used by the Robinhood withdrawal entry.
327
+ * Still shares the same tracked convert session as the forward form because
328
+ * only one pending convert is allowed per account.
329
+ */
330
+ reverse?: boolean;
295
331
  close?: () => void;
296
332
  }
297
333
  declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
334
+ reverseAllowed: boolean;
335
+ currentLTV: number;
336
+ nextLTV: number;
298
337
  walletName: string | undefined;
299
338
  address: string | undefined;
300
339
  quantity: string;
@@ -330,8 +369,6 @@ declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
330
369
  minimumReceived: string;
331
370
  outAmounts: string;
332
371
  isQuoteLoading: boolean;
333
- currentLTV: number;
334
- nextLTV: number;
335
372
  activeConvertRequest: {
336
373
  status: ConvertHistoryStatus | undefined;
337
374
  sourceToken: string;
@@ -559,4 +596,8 @@ declare const DepositStatus: react__default.FC<DepositStatusProps>;
559
596
  type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
560
597
  declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
561
598
 
562
- 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 };
599
+ declare const ReverseConvertDialogId = "ReverseConvertDialogId";
600
+ declare const ReverseConvertSheetId = "ReverseConvertSheetId";
601
+ declare const ReverseConvertWidget: () => react_jsx_runtime.JSX.Element;
602
+
603
+ 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, ReverseConvertDialogId, ReverseConvertSheetId, ReverseConvertWidget, 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
@@ -133,11 +133,27 @@ declare const useWithdrawFormScript: (options: WithdrawFormScriptOptions) => {
133
133
  toAccountInfo: AccountInfo | null;
134
134
  toAccountInfoDropdownOpen: boolean;
135
135
  setToAccountInfoDropdownOpen: react.Dispatch<react.SetStateAction<boolean>>;
136
+ isRobinhoodWithdrawal: boolean;
137
+ availableUSDC: number;
136
138
  walletName: string | undefined;
137
139
  address: string | undefined;
138
140
  quantity: string;
139
141
  onQuantityChange: (qty: string) => void;
140
- sourceToken: API.TokenInfo | undefined;
142
+ sourceToken: API.TokenInfo | {
143
+ precision: number | undefined;
144
+ address?: string;
145
+ base_weight: number;
146
+ decimals?: number;
147
+ token_decimal?: number;
148
+ discount_factor?: number | null;
149
+ display_name?: string;
150
+ haircut: number;
151
+ is_collateral: boolean;
152
+ symbol?: string;
153
+ user_max_qty: number;
154
+ minimum_withdraw_amount: number;
155
+ swap_enable?: boolean;
156
+ } | undefined;
141
157
  onSourceTokenChange: (this: unknown, token: API.TokenInfo) => void;
142
158
  sourceTokens: API.TokenInfo[] | {
143
159
  symbol: string;
@@ -154,6 +170,20 @@ declare const useWithdrawFormScript: (options: WithdrawFormScriptOptions) => {
154
170
  is_collateral: boolean;
155
171
  on_chain_swap: boolean;
156
172
  chain_details: API.ChainDetail[];
173
+ }[] | {
174
+ precision: number | undefined;
175
+ address?: string;
176
+ base_weight: number;
177
+ decimals?: number;
178
+ token_decimal?: number;
179
+ discount_factor?: number | null;
180
+ display_name?: string;
181
+ haircut: number;
182
+ is_collateral: boolean;
183
+ symbol?: string;
184
+ user_max_qty: number;
185
+ minimum_withdraw_amount: number;
186
+ swap_enable?: boolean;
157
187
  }[];
158
188
  inputStatus: InputStatus;
159
189
  hintMessage: string | undefined;
@@ -292,9 +322,18 @@ declare const getEffectiveConvertStatus: (record: Pick<ConvertHistoryRecord, "st
292
322
  type ConvertFormScriptReturn = ReturnType<typeof useConvertFormScript>;
293
323
  interface ConvertFormScriptOptions {
294
324
  token?: string;
325
+ /**
326
+ * Internal fixed-direction form used by the Robinhood withdrawal entry.
327
+ * Still shares the same tracked convert session as the forward form because
328
+ * only one pending convert is allowed per account.
329
+ */
330
+ reverse?: boolean;
295
331
  close?: () => void;
296
332
  }
297
333
  declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
334
+ reverseAllowed: boolean;
335
+ currentLTV: number;
336
+ nextLTV: number;
298
337
  walletName: string | undefined;
299
338
  address: string | undefined;
300
339
  quantity: string;
@@ -330,8 +369,6 @@ declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
330
369
  minimumReceived: string;
331
370
  outAmounts: string;
332
371
  isQuoteLoading: boolean;
333
- currentLTV: number;
334
- nextLTV: number;
335
372
  activeConvertRequest: {
336
373
  status: ConvertHistoryStatus | undefined;
337
374
  sourceToken: string;
@@ -559,4 +596,8 @@ declare const DepositStatus: react__default.FC<DepositStatusProps>;
559
596
  type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
560
597
  declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
561
598
 
562
- 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 };
599
+ declare const ReverseConvertDialogId = "ReverseConvertDialogId";
600
+ declare const ReverseConvertSheetId = "ReverseConvertSheetId";
601
+ declare const ReverseConvertWidget: () => react_jsx_runtime.JSX.Element;
602
+
603
+ 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, ReverseConvertDialogId, ReverseConvertSheetId, ReverseConvertWidget, 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 };