@b3dotfun/sdk 0.0.33-alpha.1 → 0.0.33
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/cjs/anyspend/react/components/common/OrderDetails.js +25 -26
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +4 -1
- package/dist/cjs/global-account/react/components/Transak/TransakModal.d.ts +1 -0
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +110 -0
- package/dist/cjs/global-account/react/components/index.d.ts +9 -8
- package/dist/cjs/global-account/react/components/index.js +28 -25
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +19 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +3 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +4 -1
- package/dist/esm/global-account/react/components/Transak/TransakModal.d.ts +1 -0
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +104 -0
- package/dist/esm/global-account/react/components/index.d.ts +9 -8
- package/dist/esm/global-account/react/components/index.js +10 -8
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +19 -1
- package/dist/styles/index.css +1 -1
- package/dist/types/global-account/react/components/Transak/TransakModal.d.ts +1 -0
- package/dist/types/global-account/react/components/index.d.ts +9 -8
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +19 -1
- package/package.json +3 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +3 -6
- package/src/global-account/react/components/B3DynamicModal.tsx +4 -0
- package/src/global-account/react/components/Transak/TransakModal.tsx +131 -0
- package/src/global-account/react/components/index.ts +16 -13
- package/src/global-account/react/stores/index.ts +2 -1
- package/src/global-account/react/stores/useModalStore.ts +20 -0
|
@@ -9,6 +9,7 @@ import { LinkAccount } from "./LinkAccount/LinkAccount.js";
|
|
|
9
9
|
import { ManageAccount } from "./ManageAccount/ManageAccount.js";
|
|
10
10
|
import { RequestPermissions } from "./RequestPermissions/RequestPermissions.js";
|
|
11
11
|
import { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow.js";
|
|
12
|
+
import { TransakModal } from "./Transak/TransakModal.js";
|
|
12
13
|
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./ui/dialog.js";
|
|
13
14
|
import { Drawer, DrawerContent, DrawerDescription, DrawerTitle } from "./ui/drawer.js";
|
|
14
15
|
const debug = debugB3React("B3DynamicModal");
|
|
@@ -44,7 +45,7 @@ export function B3DynamicModal() {
|
|
|
44
45
|
const hideCloseButton = isFreestyleType;
|
|
45
46
|
// Build content class using cn utility
|
|
46
47
|
// eslint-disable-next-line tailwindcss/no-custom-classname
|
|
47
|
-
const contentClass = cn("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:px-6");
|
|
48
|
+
const contentClass = cn("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:px-6", contentType?.type === "transak" && "transak-modal");
|
|
48
49
|
debug("contentType", contentType);
|
|
49
50
|
const renderContent = () => {
|
|
50
51
|
if (!contentType)
|
|
@@ -66,6 +67,8 @@ export function B3DynamicModal() {
|
|
|
66
67
|
return _jsx(AnySpendTournament, { ...contentType, mode: "modal", action: "join" });
|
|
67
68
|
case "anySpendFundTournament":
|
|
68
69
|
return _jsx(AnySpendTournament, { ...contentType, mode: "modal", action: "fund" });
|
|
70
|
+
case "transak":
|
|
71
|
+
return _jsx(TransakModal, {});
|
|
69
72
|
case "anySpendOrderHistory":
|
|
70
73
|
return _jsx(OrderHistory, { onBack: () => { }, mode: "modal" });
|
|
71
74
|
case "anySpendStakeB3":
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TransakModal(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { TextShimmer, useAccountWallet, useB3, useModalStore } from "../../../../global-account/react/index.js";
|
|
4
|
+
import debug from "../../../../shared/utils/debug.js";
|
|
5
|
+
import { Transak } from "@transak/transak-sdk";
|
|
6
|
+
import { Loader2 } from "lucide-react";
|
|
7
|
+
import { useEffect, useMemo, useState } from "react";
|
|
8
|
+
import { toast } from "sonner";
|
|
9
|
+
export function TransakModal() {
|
|
10
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
11
|
+
const [_error, setError] = useState(null);
|
|
12
|
+
const account = useAccountWallet();
|
|
13
|
+
const { environment } = useB3();
|
|
14
|
+
console.log(`process.env.NEXT_PUBLIC_TRANSAK_API_KEY`, process.env.NEXT_PUBLIC_TRANSAK_API_KEY); // d1f4e8be-cacb-4cfa-b2cd-c591084b5ef6
|
|
15
|
+
const transakConfig = useMemo(() => {
|
|
16
|
+
return {
|
|
17
|
+
apiKey: process.env.NEXT_PUBLIC_TRANSAK_API_KEY || "", // (Required)
|
|
18
|
+
// Yes, I know it looks weird to use isDevelopment for staging, but this is how this was done on Basement. Leaving till confirming difference
|
|
19
|
+
environment: environment === "development" ? Transak.ENVIRONMENTS.STAGING : Transak.ENVIRONMENTS.PRODUCTION, // (Required)
|
|
20
|
+
containerId: "transakMount", // Id of the element where you want to initialize the iframe
|
|
21
|
+
themeColor: "0c68e9",
|
|
22
|
+
widgetHeight: "650px",
|
|
23
|
+
productsAvailed: "BUY",
|
|
24
|
+
hideMenu: true,
|
|
25
|
+
colorMode: "DARK",
|
|
26
|
+
backgroundColors: "000000", // TODO: figure out why this doesn't work
|
|
27
|
+
exchangeScreenTitle: "Buy ETH on B3",
|
|
28
|
+
isFeeCalculationHidden: true,
|
|
29
|
+
cryptoCurrencyCode: "ETH",
|
|
30
|
+
network: "b3",
|
|
31
|
+
};
|
|
32
|
+
}, [environment]);
|
|
33
|
+
const { ready } = useB3();
|
|
34
|
+
const modalOptions = useModalStore(state => state.contentType);
|
|
35
|
+
const isOnRamp = modalOptions?.type === "transak";
|
|
36
|
+
const destinationWalletAddress = isOnRamp ? modalOptions?.destinationWalletAddress : undefined;
|
|
37
|
+
const defaultCryptoAmount = isOnRamp ? modalOptions?.defaultCryptoAmount : undefined;
|
|
38
|
+
const onSuccess = isOnRamp ? modalOptions?.onSuccess : undefined;
|
|
39
|
+
const fiatAmount = isOnRamp ? modalOptions?.fiatAmount : undefined;
|
|
40
|
+
const countryCode = isOnRamp ? modalOptions?.countryCode : undefined;
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!ready || !isOnRamp)
|
|
43
|
+
return;
|
|
44
|
+
const config = {
|
|
45
|
+
...transakConfig,
|
|
46
|
+
walletAddress: destinationWalletAddress || account?.address, // In the future, this should be set to the new global B3 SCW address
|
|
47
|
+
defaultCryptoAmount,
|
|
48
|
+
disableWalletAddressForm: !!destinationWalletAddress || !!account?.address, // Only disable the form if we have an address
|
|
49
|
+
fiatAmount: fiatAmount,
|
|
50
|
+
countryCode: countryCode,
|
|
51
|
+
};
|
|
52
|
+
const transak = new Transak(config);
|
|
53
|
+
try {
|
|
54
|
+
transak.init();
|
|
55
|
+
// Add event listeners
|
|
56
|
+
Transak.on("*", data => {
|
|
57
|
+
debug("@@transak", data);
|
|
58
|
+
});
|
|
59
|
+
Transak.on(Transak.EVENTS.TRANSAK_WIDGET_CLOSE, () => {
|
|
60
|
+
setIsLoading(false);
|
|
61
|
+
debug("@@transak", "Transak SDK closed!");
|
|
62
|
+
});
|
|
63
|
+
Transak.on(Transak.EVENTS.TRANSAK_WIDGET_INITIALISED, () => {
|
|
64
|
+
debug("@@transak", "Transak SDK initialized!");
|
|
65
|
+
setIsLoading(false);
|
|
66
|
+
});
|
|
67
|
+
Transak.on(Transak.EVENTS.TRANSAK_ORDER_FAILED, orderData => {
|
|
68
|
+
debug("@@transak", orderData);
|
|
69
|
+
toast.error("Oh no! Something went wrong. Please try again.");
|
|
70
|
+
});
|
|
71
|
+
Transak.on(Transak.EVENTS.TRANSAK_ORDER_SUCCESSFUL, orderData => {
|
|
72
|
+
debug("@@transak", orderData);
|
|
73
|
+
toast.success("Successfully purchased ETH with credit card!");
|
|
74
|
+
onSuccess?.();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
setError(err instanceof Error ? err : new Error("Failed to initialize Transak"));
|
|
79
|
+
toast.error("Oh no! Something went wrong. Please try again.");
|
|
80
|
+
setIsLoading(false);
|
|
81
|
+
}
|
|
82
|
+
// Cleanup code
|
|
83
|
+
return () => {
|
|
84
|
+
transak.close();
|
|
85
|
+
};
|
|
86
|
+
}, [
|
|
87
|
+
ready,
|
|
88
|
+
account?.address,
|
|
89
|
+
destinationWalletAddress,
|
|
90
|
+
defaultCryptoAmount,
|
|
91
|
+
isOnRamp,
|
|
92
|
+
onSuccess,
|
|
93
|
+
fiatAmount,
|
|
94
|
+
transakConfig,
|
|
95
|
+
countryCode,
|
|
96
|
+
]);
|
|
97
|
+
return (_jsxs(_Fragment, { children: [isLoading && (_jsxs("div", { className: "flex h-full min-h-[650px] flex-col items-center justify-center gap-4", children: [_jsx(Loader2, { className: "h-24 w-24 animate-spin opacity-10" }), _jsx(TextShimmer, { children: "Powering up our credit card processor..." })] })), _jsx("div", { id: "transakMount", style: {
|
|
98
|
+
display: isLoading ? "none" : "block",
|
|
99
|
+
width: "100%",
|
|
100
|
+
height: "650px",
|
|
101
|
+
borderRadius: "25px",
|
|
102
|
+
overflow: "hidden",
|
|
103
|
+
} })] }));
|
|
104
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
|
|
1
2
|
export { B3DynamicModal } from "./B3DynamicModal";
|
|
2
3
|
export { B3Provider, InnerProvider } from "./B3Provider/B3Provider";
|
|
3
|
-
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
|
|
4
4
|
export { B3Context, type B3ContextType } from "./B3Provider/types";
|
|
5
5
|
export { useB3 } from "./B3Provider/useB3";
|
|
6
6
|
export { StyleRoot } from "./StyleRoot";
|
|
7
|
-
export { SignInWithB3 } from "./SignInWithB3/SignInWithB3";
|
|
8
|
-
export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow";
|
|
9
|
-
export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy";
|
|
10
7
|
export { AuthButton } from "./SignInWithB3/components/AuthButton";
|
|
11
8
|
export { PermissionItem } from "./SignInWithB3/components/PermissionItem";
|
|
12
9
|
export { WalletRow } from "./SignInWithB3/components/WalletRow";
|
|
10
|
+
export { SignInWithB3 } from "./SignInWithB3/SignInWithB3";
|
|
11
|
+
export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow";
|
|
12
|
+
export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy";
|
|
13
13
|
export { LoginStepContainer } from "./SignInWithB3/steps/LoginStep";
|
|
14
14
|
export { getConnectOptionsFromStrategy, isWalletType, type AllowedStrategy } from "./SignInWithB3/utils/signInUtils";
|
|
15
15
|
export { ManageAccount } from "./ManageAccount/ManageAccount";
|
|
@@ -19,15 +19,12 @@ export { AccountAssets } from "./AccountAssets/AccountAssets";
|
|
|
19
19
|
export { MintButton } from "./MintButton/MintButton";
|
|
20
20
|
export { SendETHButton } from "./SendETHButton/SendETHButton";
|
|
21
21
|
export { SendERC20Button } from "./SendERC20Button/SendERC20Button";
|
|
22
|
+
export { TransakModal } from "./Transak/TransakModal";
|
|
22
23
|
export { Button as CustomButton, buttonVariants as customButtonVariants } from "./custom/Button";
|
|
23
24
|
export { ClientOnly } from "./custom/ClientOnly";
|
|
24
25
|
export { CopyToClipboard } from "./custom/CopyToClipboard";
|
|
25
26
|
export { StaggeredFadeLoader } from "./custom/StaggeredFadeLoader";
|
|
26
27
|
export { WalletConnectorIcon } from "./custom/WalletConnectorIcon";
|
|
27
|
-
export { Loading } from "./ui/Loading";
|
|
28
|
-
export { ShinyButton } from "./ui/ShinyButton";
|
|
29
|
-
export { TabTrigger, Tabs, TabsContent, TabsList, TabsTransitionWrapper } from "./ui/TabSystem";
|
|
30
|
-
export { TabTrigger as TabTriggerPrimitive, TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, } from "./ui/Tabs";
|
|
31
28
|
export { Badge, badgeVariants } from "./ui/badge";
|
|
32
29
|
export { Button, buttonVariants } from "./ui/button";
|
|
33
30
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "./ui/command";
|
|
@@ -36,9 +33,13 @@ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, Dr
|
|
|
36
33
|
export { GlareCard } from "./ui/glare-card";
|
|
37
34
|
export { GlareCardRounded } from "./ui/glare-card-rounded";
|
|
38
35
|
export { Input } from "./ui/input";
|
|
36
|
+
export { Loading } from "./ui/Loading";
|
|
39
37
|
export { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
|
|
40
38
|
export { ScrollArea, ScrollBar } from "./ui/scroll-area";
|
|
39
|
+
export { ShinyButton } from "./ui/ShinyButton";
|
|
41
40
|
export { Skeleton } from "./ui/skeleton";
|
|
41
|
+
export { TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, TabTrigger as TabTriggerPrimitive, } from "./ui/Tabs";
|
|
42
|
+
export { Tabs, TabsContent, TabsList, TabsTransitionWrapper, TabTrigger } from "./ui/TabSystem";
|
|
42
43
|
export { TextLoop } from "./ui/text-loop";
|
|
43
44
|
export { TextShimmer } from "./ui/text-shimmer";
|
|
44
45
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Core Components
|
|
2
|
+
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper.js";
|
|
2
3
|
export { B3DynamicModal } from "./B3DynamicModal.js";
|
|
3
4
|
export { B3Provider, InnerProvider } from "./B3Provider/B3Provider.js";
|
|
4
|
-
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper.js";
|
|
5
5
|
export { B3Context } from "./B3Provider/types.js";
|
|
6
6
|
export { useB3 } from "./B3Provider/useB3.js";
|
|
7
7
|
export { StyleRoot } from "./StyleRoot.js";
|
|
8
8
|
// SignInWithB3 Components
|
|
9
|
-
export { SignInWithB3 } from "./SignInWithB3/SignInWithB3.js";
|
|
10
|
-
export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow.js";
|
|
11
|
-
export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy.js";
|
|
12
9
|
export { AuthButton } from "./SignInWithB3/components/AuthButton.js";
|
|
13
10
|
export { PermissionItem } from "./SignInWithB3/components/PermissionItem.js";
|
|
14
11
|
export { WalletRow } from "./SignInWithB3/components/WalletRow.js";
|
|
12
|
+
export { SignInWithB3 } from "./SignInWithB3/SignInWithB3.js";
|
|
13
|
+
export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow.js";
|
|
14
|
+
export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy.js";
|
|
15
15
|
export { LoginStepContainer } from "./SignInWithB3/steps/LoginStep.js";
|
|
16
16
|
export { getConnectOptionsFromStrategy, isWalletType } from "./SignInWithB3/utils/signInUtils.js";
|
|
17
17
|
// ManageAccount Components
|
|
@@ -27,6 +27,8 @@ export { MintButton } from "./MintButton/MintButton.js";
|
|
|
27
27
|
export { SendETHButton } from "./SendETHButton/SendETHButton.js";
|
|
28
28
|
// SendERC20Button Components
|
|
29
29
|
export { SendERC20Button } from "./SendERC20Button/SendERC20Button.js";
|
|
30
|
+
// Transak Components
|
|
31
|
+
export { TransakModal } from "./Transak/TransakModal.js";
|
|
30
32
|
// Custom Components
|
|
31
33
|
export { Button as CustomButton, buttonVariants as customButtonVariants } from "./custom/Button.js";
|
|
32
34
|
export { ClientOnly } from "./custom/ClientOnly.js";
|
|
@@ -34,10 +36,6 @@ export { CopyToClipboard } from "./custom/CopyToClipboard.js";
|
|
|
34
36
|
export { StaggeredFadeLoader } from "./custom/StaggeredFadeLoader.js";
|
|
35
37
|
export { WalletConnectorIcon } from "./custom/WalletConnectorIcon.js";
|
|
36
38
|
// UI Components
|
|
37
|
-
export { Loading } from "./ui/Loading.js";
|
|
38
|
-
export { ShinyButton } from "./ui/ShinyButton.js";
|
|
39
|
-
export { TabTrigger, Tabs, TabsContent, TabsList, TabsTransitionWrapper } from "./ui/TabSystem.js";
|
|
40
|
-
export { TabTrigger as TabTriggerPrimitive, TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, } from "./ui/Tabs.js";
|
|
41
39
|
export { Badge, badgeVariants } from "./ui/badge.js";
|
|
42
40
|
export { Button, buttonVariants } from "./ui/button.js";
|
|
43
41
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "./ui/command.js";
|
|
@@ -46,9 +44,13 @@ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, Dr
|
|
|
46
44
|
export { GlareCard } from "./ui/glare-card.js";
|
|
47
45
|
export { GlareCardRounded } from "./ui/glare-card-rounded.js";
|
|
48
46
|
export { Input } from "./ui/input.js";
|
|
47
|
+
export { Loading } from "./ui/Loading.js";
|
|
49
48
|
export { Popover, PopoverContent, PopoverTrigger } from "./ui/popover.js";
|
|
50
49
|
export { ScrollArea, ScrollBar } from "./ui/scroll-area.js";
|
|
50
|
+
export { ShinyButton } from "./ui/ShinyButton.js";
|
|
51
51
|
export { Skeleton } from "./ui/skeleton.js";
|
|
52
|
+
export { TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, TabTrigger as TabTriggerPrimitive, } from "./ui/Tabs.js";
|
|
53
|
+
export { Tabs, TabsContent, TabsList, TabsTransitionWrapper, TabTrigger } from "./ui/TabSystem.js";
|
|
52
54
|
export { TextLoop } from "./ui/text-loop.js";
|
|
53
55
|
export { TextShimmer } from "./ui/text-shimmer.js";
|
|
54
56
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useAuthStore } from "./useAuthStore";
|
|
2
2
|
export { useModalStore } from "./useModalStore";
|
|
3
|
-
export type { AnySpendBuySpinProps, AnySpendFundTournamentProps, AnySpendJoinTournamentProps, AnySpendModalProps, AnySpendNftProps, AnySpendOrderHistoryProps, AnySpendStakeB3Props,
|
|
3
|
+
export type { AnySpendBuySpinProps, AnySpendFundTournamentProps, AnySpendJoinTournamentProps, AnySpendModalProps, AnySpendNftProps, AnyspendOrderDetailsProps, AnySpendOrderHistoryProps, AnySpendStakeB3Props, ManageAccountModalProps, ModalContentType, RequestPermissionsModalProps, SignInWithB3ModalProps, TransakProps, } from "./useModalStore";
|
|
@@ -183,6 +183,24 @@ export interface AnyspendOrderDetailsProps extends BaseModalProps {
|
|
|
183
183
|
/** Whether to show the back button */
|
|
184
184
|
showBackButton?: boolean;
|
|
185
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Props for the Transak modal
|
|
188
|
+
* Handles Transak-specific on-ramping
|
|
189
|
+
*/
|
|
190
|
+
export interface TransakProps extends BaseModalProps {
|
|
191
|
+
/** Modal type identifier */
|
|
192
|
+
type: "transak";
|
|
193
|
+
/** Wallet address to receive the purchased crypto */
|
|
194
|
+
destinationWalletAddress?: string;
|
|
195
|
+
/** Default amount of crypto to purchase */
|
|
196
|
+
defaultCryptoAmount?: number;
|
|
197
|
+
/** Amount of fiat currency to spend */
|
|
198
|
+
fiatAmount?: number;
|
|
199
|
+
/** ISO country code for KYC and available payment methods */
|
|
200
|
+
countryCode?: string;
|
|
201
|
+
/** Callback function called when the purchase is successful */
|
|
202
|
+
onSuccess?: () => void;
|
|
203
|
+
}
|
|
186
204
|
/**
|
|
187
205
|
* Props for the AnySpend order history modal
|
|
188
206
|
*/
|
|
@@ -290,7 +308,7 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
290
308
|
/**
|
|
291
309
|
* Union type of all possible modal content types
|
|
292
310
|
*/
|
|
293
|
-
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | AnySpendDepositHypeProps;
|
|
311
|
+
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | TransakProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | AnySpendDepositHypeProps;
|
|
294
312
|
/**
|
|
295
313
|
* State interface for the modal store
|
|
296
314
|
*/
|