@unifold/ui-react 0.1.35 → 0.1.36
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 +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +131 -92
- package/dist/index.mjs +139 -93
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -45,6 +45,7 @@ interface UseDepositPollingResult {
|
|
|
45
45
|
}
|
|
46
46
|
declare function useDepositPolling({ userId, publishableKey, depositConfirmationMode, depositWalletId, enabled, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
|
|
47
47
|
|
|
48
|
+
type DepositModalInitialScreen = "main" | "transfer" | "card" | "tracker";
|
|
48
49
|
interface DepositModalProps {
|
|
49
50
|
open: boolean;
|
|
50
51
|
onOpenChange: (open: boolean) => void;
|
|
@@ -84,8 +85,10 @@ interface DepositModalProps {
|
|
|
84
85
|
theme?: "light" | "dark" | "auto";
|
|
85
86
|
/** Hide the dialog overlay and close button for inline/embedded mode */
|
|
86
87
|
hideOverlay?: boolean;
|
|
88
|
+
/** First screen when the modal opens. Default `main` (deposit menu). */
|
|
89
|
+
initialScreen?: DepositModalInitialScreen;
|
|
87
90
|
}
|
|
88
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, enablePayWithExchange, onDepositSuccess, onDepositError, theme, hideOverlay, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
91
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, enablePayWithExchange, onDepositSuccess, onDepositError, theme, hideOverlay, initialScreen, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
89
92
|
|
|
90
93
|
interface DepositHeaderProps {
|
|
91
94
|
title: string;
|
|
@@ -717,4 +720,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
717
720
|
*/
|
|
718
721
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
719
722
|
|
|
720
|
-
export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, DepositPollingUi, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useDepositPolling, useTheme };
|
|
723
|
+
export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, type DepositModalInitialScreen, DepositPollingUi, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useDepositPolling, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ interface UseDepositPollingResult {
|
|
|
45
45
|
}
|
|
46
46
|
declare function useDepositPolling({ userId, publishableKey, depositConfirmationMode, depositWalletId, enabled, onDepositSuccess, onDepositError, }: UseDepositPollingOptions): UseDepositPollingResult;
|
|
47
47
|
|
|
48
|
+
type DepositModalInitialScreen = "main" | "transfer" | "card" | "tracker";
|
|
48
49
|
interface DepositModalProps {
|
|
49
50
|
open: boolean;
|
|
50
51
|
onOpenChange: (open: boolean) => void;
|
|
@@ -84,8 +85,10 @@ interface DepositModalProps {
|
|
|
84
85
|
theme?: "light" | "dark" | "auto";
|
|
85
86
|
/** Hide the dialog overlay and close button for inline/embedded mode */
|
|
86
87
|
hideOverlay?: boolean;
|
|
88
|
+
/** First screen when the modal opens. Default `main` (deposit menu). */
|
|
89
|
+
initialScreen?: DepositModalInitialScreen;
|
|
87
90
|
}
|
|
88
|
-
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, enablePayWithExchange, onDepositSuccess, onDepositError, theme, hideOverlay, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
91
|
+
declare function DepositModal({ open, onOpenChange, userId, publishableKey, modalTitle, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, hideDepositTracker, showBalanceHeader, transferInputVariant, depositConfirmationMode, enableConnectWallet, enablePayWithExchange, onDepositSuccess, onDepositError, theme, hideOverlay, initialScreen, }: DepositModalProps): react_jsx_runtime.JSX.Element;
|
|
89
92
|
|
|
90
93
|
interface DepositHeaderProps {
|
|
91
94
|
title: string;
|
|
@@ -717,4 +720,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
717
720
|
*/
|
|
718
721
|
declare function truncateAddress(address: string, startChars?: number, endChars?: number): string;
|
|
719
722
|
|
|
720
|
-
export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, DepositPollingUi, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useDepositPolling, useTheme };
|
|
723
|
+
export { type AllowedCountryResult, Button, type ButtonProps, type ButtonTokens, BuyWithCard, type CardTokens, type ComponentConfig, type ComponentOverrides, type ComponentTokens, type ContainerTokens, CurrencyListItem, CurrencyListSection, CurrencyModal, type CustomThemeColors, type DepositConfirmationMode, DepositDetailContent, DepositExecutionItem, DepositHeader, DepositModal, type DepositModalInitialScreen, DepositPollingUi, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FontConfig, type HeaderTokens, type InputTokens, type ListTokens, type ResolvedFonts, type SearchTokens, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCryptoButton, TransferCryptoDoubleInput, TransferCryptoSingleInput, buttonVariants, cn, colors, defaultColors, getColors, mergeColors, resolveComponentTokens, truncateAddress, useAllowedCountry, useDepositPolling, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -10889,14 +10889,23 @@ function DepositModal({
|
|
|
10889
10889
|
onDepositSuccess,
|
|
10890
10890
|
onDepositError,
|
|
10891
10891
|
theme = "dark",
|
|
10892
|
-
hideOverlay = false
|
|
10892
|
+
hideOverlay = false,
|
|
10893
|
+
initialScreen = "main"
|
|
10893
10894
|
}) {
|
|
10894
10895
|
const { colors: colors2, fonts, components } = useTheme();
|
|
10896
|
+
const effectiveInitialScreen = (0, import_react16.useMemo)(() => {
|
|
10897
|
+
const s = initialScreen ?? "main";
|
|
10898
|
+
if (s === "tracker" && hideDepositTracker) return "main";
|
|
10899
|
+
return s;
|
|
10900
|
+
}, [initialScreen, hideDepositTracker]);
|
|
10895
10901
|
const [containerEl, setContainerEl] = (0, import_react16.useState)(null);
|
|
10896
10902
|
const containerCallbackRef = (0, import_react16.useCallback)((el) => {
|
|
10897
10903
|
setContainerEl(el);
|
|
10898
10904
|
}, []);
|
|
10899
|
-
const [view, setView] = (0, import_react16.useState)(
|
|
10905
|
+
const [view, setView] = (0, import_react16.useState)(
|
|
10906
|
+
effectiveInitialScreen
|
|
10907
|
+
);
|
|
10908
|
+
const resetViewTimeoutRef = (0, import_react16.useRef)(null);
|
|
10900
10909
|
const [cardView, setCardView] = (0, import_react16.useState)(
|
|
10901
10910
|
"amount"
|
|
10902
10911
|
);
|
|
@@ -11016,6 +11025,43 @@ function DepositModal({
|
|
|
11016
11025
|
const template = errors[code] ?? addressValidationMessages.defaultError;
|
|
11017
11026
|
return interpolate(template, metadata);
|
|
11018
11027
|
};
|
|
11028
|
+
const openingScreen = effectiveInitialScreen;
|
|
11029
|
+
const sessionOpenedFromMenu = openingScreen === "main";
|
|
11030
|
+
const standaloneNeedsDepositPrereq = openingScreen !== "main" && (view === "transfer" || view === "card");
|
|
11031
|
+
let depositPrerequisiteBody;
|
|
11032
|
+
if (isCountryLoading || isAddressValidationLoading || tokensLoading || walletsLoading || !projectConfig) {
|
|
11033
|
+
depositPrerequisiteBody = standaloneNeedsDepositPrereq ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
11034
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }),
|
|
11035
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }),
|
|
11036
|
+
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, {})
|
|
11037
|
+
] });
|
|
11038
|
+
} else if (countryError) {
|
|
11039
|
+
depositPrerequisiteBody = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
|
|
11040
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "Unable to Verify Location" }),
|
|
11042
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "We couldn't verify your location. Please check your connection and try again." })
|
|
11043
|
+
] });
|
|
11044
|
+
} else if (!isAllowed) {
|
|
11045
|
+
depositPrerequisiteBody = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
|
|
11046
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.MapPinOff, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
|
|
11047
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "No Tokens Available" }),
|
|
11048
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "There are no supported tokens available from your current location." })
|
|
11049
|
+
] });
|
|
11050
|
+
} else if (isAddressValid === false) {
|
|
11051
|
+
depositPrerequisiteBody = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
|
|
11052
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
|
|
11053
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: addressValidationMessages.unableToReceiveFunds }),
|
|
11054
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: getAddressValidationErrorMessage(
|
|
11055
|
+
addressFailureCode,
|
|
11056
|
+
addressFailureMetadata
|
|
11057
|
+
) })
|
|
11058
|
+
] });
|
|
11059
|
+
} else {
|
|
11060
|
+
depositPrerequisiteBody = null;
|
|
11061
|
+
}
|
|
11062
|
+
const showBackTransfer = sessionOpenedFromMenu;
|
|
11063
|
+
const showBackCard = cardView !== "amount" || sessionOpenedFromMenu;
|
|
11064
|
+
const showBackTracker = selectedExecution !== null || sessionOpenedFromMenu;
|
|
11019
11065
|
const themeClass = resolvedTheme === "dark" ? "uf-dark" : "";
|
|
11020
11066
|
const handleWalletDisconnect = () => {
|
|
11021
11067
|
setUserDisconnectedWallet(true);
|
|
@@ -11026,13 +11072,37 @@ function DepositModal({
|
|
|
11026
11072
|
};
|
|
11027
11073
|
const handleClose = () => {
|
|
11028
11074
|
onOpenChange(false);
|
|
11029
|
-
|
|
11030
|
-
|
|
11075
|
+
if (resetViewTimeoutRef.current) {
|
|
11076
|
+
clearTimeout(resetViewTimeoutRef.current);
|
|
11077
|
+
}
|
|
11078
|
+
resetViewTimeoutRef.current = setTimeout(() => {
|
|
11079
|
+
setView(effectiveInitialScreen);
|
|
11031
11080
|
setCardView("amount");
|
|
11032
11081
|
setExchangeView("providers");
|
|
11033
11082
|
setBrowserWalletInfo(null);
|
|
11083
|
+
resetViewTimeoutRef.current = null;
|
|
11034
11084
|
}, 200);
|
|
11035
11085
|
};
|
|
11086
|
+
(0, import_react16.useLayoutEffect)(() => {
|
|
11087
|
+
if (!open) return;
|
|
11088
|
+
if (resetViewTimeoutRef.current) {
|
|
11089
|
+
clearTimeout(resetViewTimeoutRef.current);
|
|
11090
|
+
resetViewTimeoutRef.current = null;
|
|
11091
|
+
}
|
|
11092
|
+
setView(effectiveInitialScreen);
|
|
11093
|
+
setCardView("amount");
|
|
11094
|
+
setExchangeView("providers");
|
|
11095
|
+
setBrowserWalletInfo(null);
|
|
11096
|
+
setSelectedExecution(null);
|
|
11097
|
+
}, [open, effectiveInitialScreen]);
|
|
11098
|
+
(0, import_react16.useEffect)(
|
|
11099
|
+
() => () => {
|
|
11100
|
+
if (resetViewTimeoutRef.current) {
|
|
11101
|
+
clearTimeout(resetViewTimeoutRef.current);
|
|
11102
|
+
}
|
|
11103
|
+
},
|
|
11104
|
+
[]
|
|
11105
|
+
);
|
|
11036
11106
|
const handleBack = () => {
|
|
11037
11107
|
if (view === "card" && cardView === "quotes") {
|
|
11038
11108
|
setCardView("amount");
|
|
@@ -11145,95 +11215,64 @@ function DepositModal({
|
|
|
11145
11215
|
publishableKey
|
|
11146
11216
|
}
|
|
11147
11217
|
),
|
|
11148
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children:
|
|
11149
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
/*
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
{
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
{
|
|
11201
|
-
onClick: () => setView("card"),
|
|
11202
|
-
title: t6.depositWithCard.title,
|
|
11203
|
-
subtitle: t6.depositWithCard.subtitle,
|
|
11204
|
-
paymentNetworks: projectConfig.payment_networks.networks
|
|
11205
|
-
}
|
|
11206
|
-
),
|
|
11207
|
-
showPayWithExchange && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11208
|
-
PayWithExchangeButton,
|
|
11209
|
-
{
|
|
11210
|
-
onClick: () => setView("exchange"),
|
|
11211
|
-
title: t6.payWithExchange.title,
|
|
11212
|
-
subtitle: t6.payWithExchange.subtitle,
|
|
11213
|
-
exchanges,
|
|
11214
|
-
loading: exchangesLoading
|
|
11215
|
-
}
|
|
11216
|
-
),
|
|
11217
|
-
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11218
|
-
DepositTrackerButton,
|
|
11219
|
-
{
|
|
11220
|
-
onClick: () => {
|
|
11221
|
-
setAllExecutions(depositExecutions);
|
|
11222
|
-
setView("tracker");
|
|
11223
|
-
},
|
|
11224
|
-
title: "Deposit Tracker",
|
|
11225
|
-
subtitle: "Track your deposit progress",
|
|
11226
|
-
badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
|
|
11227
|
-
}
|
|
11228
|
-
)
|
|
11229
|
-
] })
|
|
11230
|
-
) })
|
|
11218
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody ?? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
11219
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11220
|
+
TransferCryptoButton,
|
|
11221
|
+
{
|
|
11222
|
+
onClick: () => setView("transfer"),
|
|
11223
|
+
title: t6.transferCrypto.title,
|
|
11224
|
+
subtitle: t6.transferCrypto.subtitle,
|
|
11225
|
+
featuredTokens: projectConfig?.transfer_crypto.networks
|
|
11226
|
+
}
|
|
11227
|
+
),
|
|
11228
|
+
enableConnectWallet && !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11229
|
+
BrowserWalletButton,
|
|
11230
|
+
{
|
|
11231
|
+
onClick: handleBrowserWalletClick,
|
|
11232
|
+
onConnectClick: handleWalletConnectClick,
|
|
11233
|
+
onDisconnect: handleWalletDisconnect,
|
|
11234
|
+
chainType: browserWalletChainType,
|
|
11235
|
+
publishableKey
|
|
11236
|
+
}
|
|
11237
|
+
),
|
|
11238
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11239
|
+
DepositWithCardButton,
|
|
11240
|
+
{
|
|
11241
|
+
onClick: () => setView("card"),
|
|
11242
|
+
title: t6.depositWithCard.title,
|
|
11243
|
+
subtitle: t6.depositWithCard.subtitle,
|
|
11244
|
+
paymentNetworks: projectConfig?.payment_networks.networks
|
|
11245
|
+
}
|
|
11246
|
+
),
|
|
11247
|
+
showPayWithExchange && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11248
|
+
PayWithExchangeButton,
|
|
11249
|
+
{
|
|
11250
|
+
onClick: () => setView("exchange"),
|
|
11251
|
+
title: t6.payWithExchange.title,
|
|
11252
|
+
subtitle: t6.payWithExchange.subtitle,
|
|
11253
|
+
exchanges,
|
|
11254
|
+
loading: exchangesLoading
|
|
11255
|
+
}
|
|
11256
|
+
),
|
|
11257
|
+
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11258
|
+
DepositTrackerButton,
|
|
11259
|
+
{
|
|
11260
|
+
onClick: () => {
|
|
11261
|
+
setAllExecutions(depositExecutions);
|
|
11262
|
+
setView("tracker");
|
|
11263
|
+
},
|
|
11264
|
+
title: "Deposit Tracker",
|
|
11265
|
+
subtitle: "Track your deposit progress",
|
|
11266
|
+
badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
|
|
11267
|
+
}
|
|
11268
|
+
)
|
|
11269
|
+
] }) })
|
|
11231
11270
|
] }) : view === "transfer" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
11232
11271
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11233
11272
|
DepositHeader,
|
|
11234
11273
|
{
|
|
11235
11274
|
title: t6.transferCrypto.title,
|
|
11236
|
-
showBack:
|
|
11275
|
+
showBack: showBackTransfer,
|
|
11237
11276
|
onBack: handleBack,
|
|
11238
11277
|
onClose: handleClose,
|
|
11239
11278
|
showBalance: showBalanceHeader,
|
|
@@ -11245,7 +11284,7 @@ function DepositModal({
|
|
|
11245
11284
|
publishableKey
|
|
11246
11285
|
}
|
|
11247
11286
|
),
|
|
11248
|
-
transferInputVariant === "single_input" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11287
|
+
standaloneNeedsDepositPrereq && depositPrerequisiteBody !== null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody }) : transferInputVariant === "single_input" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11249
11288
|
TransferCryptoSingleInput,
|
|
11250
11289
|
{
|
|
11251
11290
|
userId,
|
|
@@ -11281,7 +11320,7 @@ function DepositModal({
|
|
|
11281
11320
|
DepositHeader,
|
|
11282
11321
|
{
|
|
11283
11322
|
title: selectedExecution ? "Deposit Details" : "Deposit Tracker",
|
|
11284
|
-
showBack:
|
|
11323
|
+
showBack: showBackTracker,
|
|
11285
11324
|
onBack: handleBack,
|
|
11286
11325
|
onClose: handleClose
|
|
11287
11326
|
}
|
|
@@ -11306,7 +11345,7 @@ function DepositModal({
|
|
|
11306
11345
|
DepositHeader,
|
|
11307
11346
|
{
|
|
11308
11347
|
title: cardView === "quotes" ? t6.quotes : t6.depositWithCard.title,
|
|
11309
|
-
showBack:
|
|
11348
|
+
showBack: showBackCard,
|
|
11310
11349
|
onBack: handleBack,
|
|
11311
11350
|
onClose: handleClose,
|
|
11312
11351
|
badge: cardView === "quotes" ? { count: quotesCount } : void 0,
|
|
@@ -11319,7 +11358,7 @@ function DepositModal({
|
|
|
11319
11358
|
publishableKey
|
|
11320
11359
|
}
|
|
11321
11360
|
),
|
|
11322
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11361
|
+
standaloneNeedsDepositPrereq && depositPrerequisiteBody !== null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11323
11362
|
BuyWithCard,
|
|
11324
11363
|
{
|
|
11325
11364
|
userId,
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// src/components/deposits/DepositModal.tsx
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
useState as useState26,
|
|
4
|
+
useEffect as useEffect20,
|
|
5
|
+
useLayoutEffect as useLayoutEffect2,
|
|
6
|
+
useCallback as useCallback3,
|
|
7
|
+
useRef as useRef5,
|
|
8
|
+
useMemo as useMemo8
|
|
9
|
+
} from "react";
|
|
3
10
|
import { ChevronRight as ChevronRight11, MapPinOff, AlertTriangle } from "lucide-react";
|
|
4
11
|
|
|
5
12
|
// src/components/shared/dialog.tsx
|
|
@@ -10870,14 +10877,23 @@ function DepositModal({
|
|
|
10870
10877
|
onDepositSuccess,
|
|
10871
10878
|
onDepositError,
|
|
10872
10879
|
theme = "dark",
|
|
10873
|
-
hideOverlay = false
|
|
10880
|
+
hideOverlay = false,
|
|
10881
|
+
initialScreen = "main"
|
|
10874
10882
|
}) {
|
|
10875
10883
|
const { colors: colors2, fonts, components } = useTheme();
|
|
10884
|
+
const effectiveInitialScreen = useMemo8(() => {
|
|
10885
|
+
const s = initialScreen ?? "main";
|
|
10886
|
+
if (s === "tracker" && hideDepositTracker) return "main";
|
|
10887
|
+
return s;
|
|
10888
|
+
}, [initialScreen, hideDepositTracker]);
|
|
10876
10889
|
const [containerEl, setContainerEl] = useState26(null);
|
|
10877
10890
|
const containerCallbackRef = useCallback3((el) => {
|
|
10878
10891
|
setContainerEl(el);
|
|
10879
10892
|
}, []);
|
|
10880
|
-
const [view, setView] = useState26(
|
|
10893
|
+
const [view, setView] = useState26(
|
|
10894
|
+
effectiveInitialScreen
|
|
10895
|
+
);
|
|
10896
|
+
const resetViewTimeoutRef = useRef5(null);
|
|
10881
10897
|
const [cardView, setCardView] = useState26(
|
|
10882
10898
|
"amount"
|
|
10883
10899
|
);
|
|
@@ -10997,6 +11013,43 @@ function DepositModal({
|
|
|
10997
11013
|
const template = errors[code] ?? addressValidationMessages.defaultError;
|
|
10998
11014
|
return interpolate(template, metadata);
|
|
10999
11015
|
};
|
|
11016
|
+
const openingScreen = effectiveInitialScreen;
|
|
11017
|
+
const sessionOpenedFromMenu = openingScreen === "main";
|
|
11018
|
+
const standaloneNeedsDepositPrereq = openingScreen !== "main" && (view === "transfer" || view === "card");
|
|
11019
|
+
let depositPrerequisiteBody;
|
|
11020
|
+
if (isCountryLoading || isAddressValidationLoading || tokensLoading || walletsLoading || !projectConfig) {
|
|
11021
|
+
depositPrerequisiteBody = standaloneNeedsDepositPrereq ? /* @__PURE__ */ jsx48(SkeletonButton, { variant: "with-icons" }) : /* @__PURE__ */ jsxs43(Fragment11, { children: [
|
|
11022
|
+
/* @__PURE__ */ jsx48(SkeletonButton, { variant: "with-icons" }),
|
|
11023
|
+
/* @__PURE__ */ jsx48(SkeletonButton, { variant: "with-icons" }),
|
|
11024
|
+
!hideDepositTracker && /* @__PURE__ */ jsx48(SkeletonButton, {})
|
|
11025
|
+
] });
|
|
11026
|
+
} else if (countryError) {
|
|
11027
|
+
depositPrerequisiteBody = /* @__PURE__ */ jsxs43("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
|
|
11028
|
+
/* @__PURE__ */ jsx48("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx48(AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
|
|
11029
|
+
/* @__PURE__ */ jsx48("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "Unable to Verify Location" }),
|
|
11030
|
+
/* @__PURE__ */ jsx48("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "We couldn't verify your location. Please check your connection and try again." })
|
|
11031
|
+
] });
|
|
11032
|
+
} else if (!isAllowed) {
|
|
11033
|
+
depositPrerequisiteBody = /* @__PURE__ */ jsxs43("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
|
|
11034
|
+
/* @__PURE__ */ jsx48("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx48(MapPinOff, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
|
|
11035
|
+
/* @__PURE__ */ jsx48("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "No Tokens Available" }),
|
|
11036
|
+
/* @__PURE__ */ jsx48("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "There are no supported tokens available from your current location." })
|
|
11037
|
+
] });
|
|
11038
|
+
} else if (isAddressValid === false) {
|
|
11039
|
+
depositPrerequisiteBody = /* @__PURE__ */ jsxs43("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
|
|
11040
|
+
/* @__PURE__ */ jsx48("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsx48(AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
|
|
11041
|
+
/* @__PURE__ */ jsx48("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: addressValidationMessages.unableToReceiveFunds }),
|
|
11042
|
+
/* @__PURE__ */ jsx48("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: getAddressValidationErrorMessage(
|
|
11043
|
+
addressFailureCode,
|
|
11044
|
+
addressFailureMetadata
|
|
11045
|
+
) })
|
|
11046
|
+
] });
|
|
11047
|
+
} else {
|
|
11048
|
+
depositPrerequisiteBody = null;
|
|
11049
|
+
}
|
|
11050
|
+
const showBackTransfer = sessionOpenedFromMenu;
|
|
11051
|
+
const showBackCard = cardView !== "amount" || sessionOpenedFromMenu;
|
|
11052
|
+
const showBackTracker = selectedExecution !== null || sessionOpenedFromMenu;
|
|
11000
11053
|
const themeClass = resolvedTheme === "dark" ? "uf-dark" : "";
|
|
11001
11054
|
const handleWalletDisconnect = () => {
|
|
11002
11055
|
setUserDisconnectedWallet(true);
|
|
@@ -11007,13 +11060,37 @@ function DepositModal({
|
|
|
11007
11060
|
};
|
|
11008
11061
|
const handleClose = () => {
|
|
11009
11062
|
onOpenChange(false);
|
|
11010
|
-
|
|
11011
|
-
|
|
11063
|
+
if (resetViewTimeoutRef.current) {
|
|
11064
|
+
clearTimeout(resetViewTimeoutRef.current);
|
|
11065
|
+
}
|
|
11066
|
+
resetViewTimeoutRef.current = setTimeout(() => {
|
|
11067
|
+
setView(effectiveInitialScreen);
|
|
11012
11068
|
setCardView("amount");
|
|
11013
11069
|
setExchangeView("providers");
|
|
11014
11070
|
setBrowserWalletInfo(null);
|
|
11071
|
+
resetViewTimeoutRef.current = null;
|
|
11015
11072
|
}, 200);
|
|
11016
11073
|
};
|
|
11074
|
+
useLayoutEffect2(() => {
|
|
11075
|
+
if (!open) return;
|
|
11076
|
+
if (resetViewTimeoutRef.current) {
|
|
11077
|
+
clearTimeout(resetViewTimeoutRef.current);
|
|
11078
|
+
resetViewTimeoutRef.current = null;
|
|
11079
|
+
}
|
|
11080
|
+
setView(effectiveInitialScreen);
|
|
11081
|
+
setCardView("amount");
|
|
11082
|
+
setExchangeView("providers");
|
|
11083
|
+
setBrowserWalletInfo(null);
|
|
11084
|
+
setSelectedExecution(null);
|
|
11085
|
+
}, [open, effectiveInitialScreen]);
|
|
11086
|
+
useEffect20(
|
|
11087
|
+
() => () => {
|
|
11088
|
+
if (resetViewTimeoutRef.current) {
|
|
11089
|
+
clearTimeout(resetViewTimeoutRef.current);
|
|
11090
|
+
}
|
|
11091
|
+
},
|
|
11092
|
+
[]
|
|
11093
|
+
);
|
|
11017
11094
|
const handleBack = () => {
|
|
11018
11095
|
if (view === "card" && cardView === "quotes") {
|
|
11019
11096
|
setCardView("amount");
|
|
@@ -11126,95 +11203,64 @@ function DepositModal({
|
|
|
11126
11203
|
publishableKey
|
|
11127
11204
|
}
|
|
11128
11205
|
),
|
|
11129
|
-
/* @__PURE__ */ jsx48("div", { className: "uf-pb-4 uf-space-y-3", children:
|
|
11130
|
-
/* @__PURE__ */ jsx48(
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
/* @__PURE__ */
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
{
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
{
|
|
11182
|
-
onClick: () => setView("card"),
|
|
11183
|
-
title: t6.depositWithCard.title,
|
|
11184
|
-
subtitle: t6.depositWithCard.subtitle,
|
|
11185
|
-
paymentNetworks: projectConfig.payment_networks.networks
|
|
11186
|
-
}
|
|
11187
|
-
),
|
|
11188
|
-
showPayWithExchange && /* @__PURE__ */ jsx48(
|
|
11189
|
-
PayWithExchangeButton,
|
|
11190
|
-
{
|
|
11191
|
-
onClick: () => setView("exchange"),
|
|
11192
|
-
title: t6.payWithExchange.title,
|
|
11193
|
-
subtitle: t6.payWithExchange.subtitle,
|
|
11194
|
-
exchanges,
|
|
11195
|
-
loading: exchangesLoading
|
|
11196
|
-
}
|
|
11197
|
-
),
|
|
11198
|
-
!hideDepositTracker && /* @__PURE__ */ jsx48(
|
|
11199
|
-
DepositTrackerButton,
|
|
11200
|
-
{
|
|
11201
|
-
onClick: () => {
|
|
11202
|
-
setAllExecutions(depositExecutions);
|
|
11203
|
-
setView("tracker");
|
|
11204
|
-
},
|
|
11205
|
-
title: "Deposit Tracker",
|
|
11206
|
-
subtitle: "Track your deposit progress",
|
|
11207
|
-
badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
|
|
11208
|
-
}
|
|
11209
|
-
)
|
|
11210
|
-
] })
|
|
11211
|
-
) })
|
|
11206
|
+
/* @__PURE__ */ jsx48("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody ?? /* @__PURE__ */ jsxs43(Fragment11, { children: [
|
|
11207
|
+
/* @__PURE__ */ jsx48(
|
|
11208
|
+
TransferCryptoButton,
|
|
11209
|
+
{
|
|
11210
|
+
onClick: () => setView("transfer"),
|
|
11211
|
+
title: t6.transferCrypto.title,
|
|
11212
|
+
subtitle: t6.transferCrypto.subtitle,
|
|
11213
|
+
featuredTokens: projectConfig?.transfer_crypto.networks
|
|
11214
|
+
}
|
|
11215
|
+
),
|
|
11216
|
+
enableConnectWallet && !isMobileView && /* @__PURE__ */ jsx48(
|
|
11217
|
+
BrowserWalletButton,
|
|
11218
|
+
{
|
|
11219
|
+
onClick: handleBrowserWalletClick,
|
|
11220
|
+
onConnectClick: handleWalletConnectClick,
|
|
11221
|
+
onDisconnect: handleWalletDisconnect,
|
|
11222
|
+
chainType: browserWalletChainType,
|
|
11223
|
+
publishableKey
|
|
11224
|
+
}
|
|
11225
|
+
),
|
|
11226
|
+
/* @__PURE__ */ jsx48(
|
|
11227
|
+
DepositWithCardButton,
|
|
11228
|
+
{
|
|
11229
|
+
onClick: () => setView("card"),
|
|
11230
|
+
title: t6.depositWithCard.title,
|
|
11231
|
+
subtitle: t6.depositWithCard.subtitle,
|
|
11232
|
+
paymentNetworks: projectConfig?.payment_networks.networks
|
|
11233
|
+
}
|
|
11234
|
+
),
|
|
11235
|
+
showPayWithExchange && /* @__PURE__ */ jsx48(
|
|
11236
|
+
PayWithExchangeButton,
|
|
11237
|
+
{
|
|
11238
|
+
onClick: () => setView("exchange"),
|
|
11239
|
+
title: t6.payWithExchange.title,
|
|
11240
|
+
subtitle: t6.payWithExchange.subtitle,
|
|
11241
|
+
exchanges,
|
|
11242
|
+
loading: exchangesLoading
|
|
11243
|
+
}
|
|
11244
|
+
),
|
|
11245
|
+
!hideDepositTracker && /* @__PURE__ */ jsx48(
|
|
11246
|
+
DepositTrackerButton,
|
|
11247
|
+
{
|
|
11248
|
+
onClick: () => {
|
|
11249
|
+
setAllExecutions(depositExecutions);
|
|
11250
|
+
setView("tracker");
|
|
11251
|
+
},
|
|
11252
|
+
title: "Deposit Tracker",
|
|
11253
|
+
subtitle: "Track your deposit progress",
|
|
11254
|
+
badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
|
|
11255
|
+
}
|
|
11256
|
+
)
|
|
11257
|
+
] }) })
|
|
11212
11258
|
] }) : view === "transfer" ? /* @__PURE__ */ jsxs43(Fragment11, { children: [
|
|
11213
11259
|
/* @__PURE__ */ jsx48(
|
|
11214
11260
|
DepositHeader,
|
|
11215
11261
|
{
|
|
11216
11262
|
title: t6.transferCrypto.title,
|
|
11217
|
-
showBack:
|
|
11263
|
+
showBack: showBackTransfer,
|
|
11218
11264
|
onBack: handleBack,
|
|
11219
11265
|
onClose: handleClose,
|
|
11220
11266
|
showBalance: showBalanceHeader,
|
|
@@ -11226,7 +11272,7 @@ function DepositModal({
|
|
|
11226
11272
|
publishableKey
|
|
11227
11273
|
}
|
|
11228
11274
|
),
|
|
11229
|
-
transferInputVariant === "single_input" ? /* @__PURE__ */ jsx48(
|
|
11275
|
+
standaloneNeedsDepositPrereq && depositPrerequisiteBody !== null ? /* @__PURE__ */ jsx48("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody }) : transferInputVariant === "single_input" ? /* @__PURE__ */ jsx48(
|
|
11230
11276
|
TransferCryptoSingleInput,
|
|
11231
11277
|
{
|
|
11232
11278
|
userId,
|
|
@@ -11262,7 +11308,7 @@ function DepositModal({
|
|
|
11262
11308
|
DepositHeader,
|
|
11263
11309
|
{
|
|
11264
11310
|
title: selectedExecution ? "Deposit Details" : "Deposit Tracker",
|
|
11265
|
-
showBack:
|
|
11311
|
+
showBack: showBackTracker,
|
|
11266
11312
|
onBack: handleBack,
|
|
11267
11313
|
onClose: handleClose
|
|
11268
11314
|
}
|
|
@@ -11287,7 +11333,7 @@ function DepositModal({
|
|
|
11287
11333
|
DepositHeader,
|
|
11288
11334
|
{
|
|
11289
11335
|
title: cardView === "quotes" ? t6.quotes : t6.depositWithCard.title,
|
|
11290
|
-
showBack:
|
|
11336
|
+
showBack: showBackCard,
|
|
11291
11337
|
onBack: handleBack,
|
|
11292
11338
|
onClose: handleClose,
|
|
11293
11339
|
badge: cardView === "quotes" ? { count: quotesCount } : void 0,
|
|
@@ -11300,7 +11346,7 @@ function DepositModal({
|
|
|
11300
11346
|
publishableKey
|
|
11301
11347
|
}
|
|
11302
11348
|
),
|
|
11303
|
-
/* @__PURE__ */ jsx48(
|
|
11349
|
+
standaloneNeedsDepositPrereq && depositPrerequisiteBody !== null ? /* @__PURE__ */ jsx48("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody }) : /* @__PURE__ */ jsx48(
|
|
11304
11350
|
BuyWithCard,
|
|
11305
11351
|
{
|
|
11306
11352
|
userId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "Unifold UI React - Deposit and onramp components for React applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"lucide-react": "^0.454.0",
|
|
44
44
|
"qr-code-styling": "^1.6.0-rc.1",
|
|
45
45
|
"tailwind-merge": "^2.0.0",
|
|
46
|
-
"@unifold/core": "0.1.
|
|
46
|
+
"@unifold/core": "0.1.36"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@solana/spl-token": "^0.3.8",
|