@unifold/ui-react 0.1.28 → 0.1.29

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
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { AutoSwapResponse, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
2
+ import { AutoSwapResponse, ChainType, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
3
3
  export { ChainType } from '@unifold/core';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import * as React from 'react';
@@ -53,7 +53,7 @@ interface DepositModalProps {
53
53
  modalTitle?: string;
54
54
  destinationTokenSymbol?: string;
55
55
  recipientAddress?: string;
56
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
56
+ destinationChainType?: ChainType;
57
57
  destinationChainId?: string;
58
58
  destinationTokenAddress?: string;
59
59
  hideDepositTracker?: boolean;
@@ -69,6 +69,8 @@ interface DepositModalProps {
69
69
  depositConfirmationMode?: DepositConfirmationMode;
70
70
  /** Enable browser wallet connection option. Defaults to false */
71
71
  enableConnectWallet?: boolean;
72
+ /** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
73
+ enablePayWithExchange?: boolean;
72
74
  onDepositSuccess?: (data: {
73
75
  message: string;
74
76
  transaction?: unknown;
@@ -81,7 +83,7 @@ interface DepositModalProps {
81
83
  }) => void;
82
84
  theme?: "light" | "dark" | "auto";
83
85
  }
84
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
86
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, enablePayWithExchange, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
85
87
 
86
88
  interface DepositHeaderProps {
87
89
  title: string;
@@ -108,7 +110,7 @@ interface TransferCryptoSingleInputProps {
108
110
  userId: string;
109
111
  publishableKey: string;
110
112
  recipientAddress?: string;
111
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
113
+ destinationChainType?: ChainType;
112
114
  destinationChainId?: string;
113
115
  destinationTokenAddress?: string;
114
116
  /** Controls when polling starts and whether a waiting UI is shown.
@@ -136,7 +138,7 @@ interface TransferCryptoDoubleInputProps {
136
138
  userId: string;
137
139
  publishableKey: string;
138
140
  recipientAddress?: string;
139
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
141
+ destinationChainType?: ChainType;
140
142
  destinationChainId?: string;
141
143
  destinationTokenAddress?: string;
142
144
  /** Controls when polling starts and whether a waiting UI is shown.
@@ -169,7 +171,7 @@ interface BuyWithCardProps {
169
171
  accentColor?: string;
170
172
  destinationTokenSymbol?: string;
171
173
  recipientAddress?: string;
172
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
174
+ destinationChainType?: ChainType;
173
175
  destinationChainId?: string;
174
176
  destinationTokenAddress?: string;
175
177
  onDepositSuccess?: (data: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { AutoSwapResponse, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
2
+ import { AutoSwapResponse, ChainType, Wallet, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork } from '@unifold/core';
3
3
  export { ChainType } from '@unifold/core';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import * as React from 'react';
@@ -53,7 +53,7 @@ interface DepositModalProps {
53
53
  modalTitle?: string;
54
54
  destinationTokenSymbol?: string;
55
55
  recipientAddress?: string;
56
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
56
+ destinationChainType?: ChainType;
57
57
  destinationChainId?: string;
58
58
  destinationTokenAddress?: string;
59
59
  hideDepositTracker?: boolean;
@@ -69,6 +69,8 @@ interface DepositModalProps {
69
69
  depositConfirmationMode?: DepositConfirmationMode;
70
70
  /** Enable browser wallet connection option. Defaults to false */
71
71
  enableConnectWallet?: boolean;
72
+ /** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
73
+ enablePayWithExchange?: boolean;
72
74
  onDepositSuccess?: (data: {
73
75
  message: string;
74
76
  transaction?: unknown;
@@ -81,7 +83,7 @@ interface DepositModalProps {
81
83
  }) => void;
82
84
  theme?: "light" | "dark" | "auto";
83
85
  }
84
- declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
86
+ declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, enablePayWithExchange, onDepositSuccess, onDepositError, theme, }: DepositModalProps): react_jsx_runtime.JSX.Element;
85
87
 
86
88
  interface DepositHeaderProps {
87
89
  title: string;
@@ -108,7 +110,7 @@ interface TransferCryptoSingleInputProps {
108
110
  userId: string;
109
111
  publishableKey: string;
110
112
  recipientAddress?: string;
111
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
113
+ destinationChainType?: ChainType;
112
114
  destinationChainId?: string;
113
115
  destinationTokenAddress?: string;
114
116
  /** Controls when polling starts and whether a waiting UI is shown.
@@ -136,7 +138,7 @@ interface TransferCryptoDoubleInputProps {
136
138
  userId: string;
137
139
  publishableKey: string;
138
140
  recipientAddress?: string;
139
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
141
+ destinationChainType?: ChainType;
140
142
  destinationChainId?: string;
141
143
  destinationTokenAddress?: string;
142
144
  /** Controls when polling starts and whether a waiting UI is shown.
@@ -169,7 +171,7 @@ interface BuyWithCardProps {
169
171
  accentColor?: string;
170
172
  destinationTokenSymbol?: string;
171
173
  recipientAddress?: string;
172
- destinationChainType?: "ethereum" | "solana" | "bitcoin" | "algorand" | "xrpl";
174
+ destinationChainType?: ChainType;
173
175
  destinationChainId?: string;
174
176
  destinationTokenAddress?: string;
175
177
  onDepositSuccess?: (data: {