@b3dotfun/sdk 0.0.7-alpha.23 → 0.0.7-alpha.25
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/AnySpendCustom.js +27 -14
- package/dist/cjs/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/common/Warning.js +7 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +4 -3
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +11 -10
- package/dist/cjs/global-account/react/components/custom/Button.d.ts +2 -2
- package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/cjs/shared/constants/chains/supported.d.ts +14 -14
- package/dist/cjs/shared/utils/insights.d.ts +1 -1
- package/dist/cjs/shared/utils/simplehash.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +28 -15
- package/dist/esm/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/esm/anyspend/react/components/common/Warning.js +4 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +1 -1
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +2 -1
- package/dist/esm/global-account/react/components/B3DynamicModal.js +1 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +2 -1
- package/dist/esm/global-account/react/components/custom/Button.d.ts +2 -2
- package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/esm/shared/constants/chains/supported.d.ts +14 -14
- package/dist/esm/shared/utils/insights.d.ts +1 -1
- package/dist/esm/shared/utils/simplehash.d.ts +2 -2
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/types/global-account/react/components/custom/Button.d.ts +2 -2
- package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/types/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/types/shared/constants/chains/supported.d.ts +14 -14
- package/dist/types/shared/utils/insights.d.ts +1 -1
- package/dist/types/shared/utils/simplehash.d.ts +2 -2
- package/package.json +2 -1
- package/src/anyspend/react/components/AnySpend.tsx +10 -2
- package/src/anyspend/react/components/AnySpendCustom.tsx +56 -21
- package/src/anyspend/react/components/common/Warning.tsx +7 -0
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +1 -1
- package/src/anyspend/react/providers/AnyspendProvider.tsx +6 -1
- package/src/global-account/react/components/B3DynamicModal.tsx +1 -1
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +16 -13
- package/src/global-account/react/components/ui/tooltip.tsx +1 -1
- package/src/styles/index.css +5 -2
|
@@ -158,19 +158,32 @@ function AnySpendCustom({ isMainnet = true, loadOrder, mode = "modal", recipient
|
|
|
158
158
|
}
|
|
159
159
|
}, [srcChainId, tokenList, getTokenWithBalance, nativeTokens, fungibleTokens, dirtySelectSrcToken, dstToken.address]);
|
|
160
160
|
const { account: isAuthenticated } = (0, react_1.useB3)();
|
|
161
|
-
const getRelayQuoteRequest =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
161
|
+
const getRelayQuoteRequest = (0, react_2.useMemo)(() => {
|
|
162
|
+
return generateGetRelayQuoteRequest({
|
|
163
|
+
orderType: orderType,
|
|
164
|
+
srcChainId: srcChainId,
|
|
165
|
+
srcToken: srcToken,
|
|
166
|
+
dstChainId: dstChainId,
|
|
167
|
+
dstToken: dstToken,
|
|
168
|
+
dstAmount: dstAmount,
|
|
169
|
+
contractAddress: contractAddress,
|
|
170
|
+
tokenId: (0, anyspend_1.isNftMetadata)(metadata) ? metadata.nftContract.tokenId : undefined,
|
|
171
|
+
contractType: (0, anyspend_1.isNftMetadata)(metadata) ? metadata.nftContract.type : undefined,
|
|
172
|
+
encodedData: encodedData,
|
|
173
|
+
spenderAddress: spenderAddress,
|
|
174
|
+
});
|
|
175
|
+
}, [
|
|
176
|
+
contractAddress,
|
|
177
|
+
dstAmount,
|
|
178
|
+
dstChainId,
|
|
179
|
+
dstToken,
|
|
180
|
+
encodedData,
|
|
181
|
+
metadata,
|
|
182
|
+
orderType,
|
|
183
|
+
spenderAddress,
|
|
184
|
+
srcChainId,
|
|
185
|
+
srcToken,
|
|
186
|
+
]);
|
|
174
187
|
const { anyspendQuote, isLoadingAnyspendQuote } = (0, anyspend_1.useAnyspendQuote)(isMainnet, getRelayQuoteRequest);
|
|
175
188
|
// Get geo data and onramp options (after quote is available)
|
|
176
189
|
const { geoData, isOnrampSupported } = (0, anyspend_1.useGeoOnrampOptions)(isMainnet, anyspendQuote?.data?.currencyIn?.amountUsd || "0");
|
|
@@ -365,7 +378,7 @@ function AnySpendCustom({ isMainnet = true, loadOrder, mode = "modal", recipient
|
|
|
365
378
|
} })] })), mode === "page" && (0, jsx_runtime_1.jsx)("div", { className: "h-12" })] }));
|
|
366
379
|
const loadingView = ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("mx-auto flex w-full flex-col items-center gap-4 p-5", mode === "modal" && "bg-b3-react-background"), children: [(0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "default", className: "bg-b3-react-muted/30 border-b3-react-border hover:bg-b3-react-muted/50 flex items-center gap-3 px-4 py-1 text-base transition-all", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "text-b3-react-foreground size-4 animate-spin" }), (0, jsx_runtime_1.jsx)(react_1.TextShimmer, { duration: 1, className: "font-sf-rounded text-base font-semibold", children: "Loading..." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-1 flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-4 flex flex-col gap-1", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-4 w-24" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-8 w-48" }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "ml-4 h-8 w-32" })] }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "mt-4 h-8 w-24" })] }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "mb-4 h-12 w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)(react_1.Skeleton, { className: "rounded-lg bg-white/5 p-6 pb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "size-[200px]" }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 flex items-center justify-center gap-2", children: (0, jsx_runtime_1.jsx)("div", { className: "size-5 rounded-full" }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-1 flex-col gap-2", children: [1, 2, 3].map(i => ((0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 w-full" }, i))) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-muted/30 mt-8 w-full rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "mb-3 h-4 w-48" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 flex-1" }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 flex-1" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex w-full flex-col gap-3", children: [1, 2, 3, 4, 5].map(i => ((0, jsx_runtime_1.jsxs)("div", { className: "flex w-full justify-between", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-4 w-24" }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-4 w-32" })] }, i))) }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 w-full" }), mode === "page" && (0, jsx_runtime_1.jsx)("div", { className: "h-12" })] }));
|
|
367
380
|
// Confirm order view.
|
|
368
|
-
const confirmOrderView = ((0, jsx_runtime_1.jsxs)("div", { className: "relative mx-auto flex w-full flex-col items-center", children: [header({ anyspendPrice: anyspendQuote, isLoadingAnyspendPrice: isLoadingAnyspendQuote }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)(react_1.Tabs, { value: activeTab, onValueChange: value => setActiveTab(value), className: "bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5", children: [
|
|
381
|
+
const confirmOrderView = ((0, jsx_runtime_1.jsxs)("div", { className: "relative mx-auto flex w-full flex-col items-center", children: [header({ anyspendPrice: anyspendQuote, isLoadingAnyspendPrice: isLoadingAnyspendQuote }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)(react_1.Tabs, { value: activeTab, onValueChange: value => setActiveTab(value), className: "bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5", children: [(0, jsx_runtime_1.jsxs)(react_1.TabsList, { hideGradient: true, className: "justify-center", children: [(0, jsx_runtime_1.jsx)(react_1.TabTrigger, { value: "crypto", children: (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary w-[140px]", children: "Pay with crypto" }) }), isOnrampSupported ? ((0, jsx_runtime_1.jsx)(react_1.TabTrigger, { value: "fiat", children: (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary w-[140px]", children: "Pay with fiat" }) })) : ((0, jsx_runtime_1.jsxs)(react_1.Tooltip, { children: [(0, jsx_runtime_1.jsx)(react_1.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(react_1.TabTrigger, { value: "fiat", disabled: true, children: (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary w-[140px]", children: "Pay with fiat" }) }) }), (0, jsx_runtime_1.jsx)(react_1.TooltipContent, { children: (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary w-[140px]", children: "Fiat payments are not supported for this amount" }) })] }))] }), (0, jsx_runtime_1.jsx)(react_1.TabsContent, { value: "crypto", children: (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 flex flex-col gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-4", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
369
382
|
opacity: hasMounted ? 1 : 0,
|
|
370
383
|
y: hasMounted ? 0 : 20,
|
|
371
384
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Warning = Warning;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
function Warning({ text }) {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "bg-as-red/60 relative rounded border border-orange-400 px-4 py-3 text-white", role: "alert", children: (0, jsx_runtime_1.jsx)("div", { className: "font-bold", children: text }) }));
|
|
7
|
+
}
|
|
@@ -23,7 +23,7 @@ const react_1 = require("react");
|
|
|
23
23
|
*/
|
|
24
24
|
function useAnyspendQuote(isMainnet, req) {
|
|
25
25
|
const { data, isLoading, refetch, error } = (0, react_query_1.useQuery)({
|
|
26
|
-
queryKey: ["useAnyspendQuote", isMainnet, req],
|
|
26
|
+
queryKey: ["useAnyspendQuote", isMainnet, JSON.stringify(req)],
|
|
27
27
|
queryFn: () => {
|
|
28
28
|
return anyspend_1.anyspendService.getQuote(isMainnet, req);
|
|
29
29
|
},
|
|
@@ -16,8 +16,8 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
16
16
|
creator?: string | undefined;
|
|
17
17
|
signatureRequestBody?: {
|
|
18
18
|
price?: string | undefined;
|
|
19
|
-
currency?: string | undefined;
|
|
20
19
|
clonePrice?: string | undefined;
|
|
20
|
+
currency?: string | undefined;
|
|
21
21
|
primarySaleRecipient?: string | undefined;
|
|
22
22
|
royaltyRecipient?: string | undefined;
|
|
23
23
|
royaltyBps?: number | undefined;
|
|
@@ -26,10 +26,10 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
26
26
|
metadata: {
|
|
27
27
|
name?: string | undefined;
|
|
28
28
|
description?: string | undefined;
|
|
29
|
-
properties?: any;
|
|
30
29
|
image?: string | undefined;
|
|
31
30
|
externalLink?: string | undefined;
|
|
32
31
|
appUri?: string | undefined;
|
|
32
|
+
properties?: any;
|
|
33
33
|
attributes?: any;
|
|
34
34
|
backgroundColor?: string | undefined;
|
|
35
35
|
promptImageUrl?: string | undefined;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.AnyspendProvider = void 0;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("../../../global-account/react");
|
|
6
7
|
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
-
const
|
|
8
|
+
const react_2 = require("react");
|
|
8
9
|
const defaultQueryClientConfig = {
|
|
9
10
|
defaultOptions: {
|
|
10
11
|
queries: {
|
|
@@ -36,7 +37,7 @@ const defaultQueryClientConfig = {
|
|
|
36
37
|
* ```
|
|
37
38
|
*/
|
|
38
39
|
const AnyspendProvider = function AnyspendProvider({ children }) {
|
|
39
|
-
const [queryClient] = (0,
|
|
40
|
-
return (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: children });
|
|
40
|
+
const [queryClient] = (0, react_2.useState)(() => new react_query_1.QueryClient(defaultQueryClientConfig));
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: children }) }));
|
|
41
42
|
};
|
|
42
43
|
exports.AnyspendProvider = AnyspendProvider;
|
|
@@ -89,5 +89,5 @@ function B3DynamicModal() {
|
|
|
89
89
|
const ModalContent = isMobile ? drawer_1.DrawerContent : dialog_1.DialogContent;
|
|
90
90
|
const ModalTitle = isMobile ? drawer_1.DrawerTitle : dialog_1.DialogTitle;
|
|
91
91
|
const ModalDescription = isMobile ? drawer_1.DrawerDescription : dialog_1.DialogDescription;
|
|
92
|
-
return ((0, jsx_runtime_1.jsx)(ModalComponent, { open: isOpen, onOpenChange: setB3ModalOpen, children: (0, jsx_runtime_1.jsxs)(ModalContent, { className: contentClass, hideCloseButton: hideCloseButton, children: [(0, jsx_runtime_1.jsx)(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), (0, jsx_runtime_1.jsx)(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), (0, jsx_runtime_1.jsxs)("div", { className: "overflow-
|
|
92
|
+
return ((0, jsx_runtime_1.jsx)(ModalComponent, { open: isOpen, onOpenChange: setB3ModalOpen, children: (0, jsx_runtime_1.jsxs)(ModalContent, { className: contentClass, hideCloseButton: hideCloseButton, children: [(0, jsx_runtime_1.jsx)(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), (0, jsx_runtime_1.jsx)(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), (0, jsx_runtime_1.jsxs)("div", { className: "overflow-auto", children: [history.length > 0 && contentType?.showBackButton && ((0, jsx_runtime_1.jsxs)("button", { onClick: navigateBack, className: "b3-modal-back-button mb-4 flex items-center gap-2 transition-colors hover:text-white", children: [(0, jsx_runtime_1.jsx)("span", { children: "\u2190" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm", children: "Back" })] })), renderContent()] })] }) }));
|
|
93
93
|
}
|
|
@@ -4,11 +4,12 @@ exports.wagmiConfig = void 0;
|
|
|
4
4
|
exports.B3Provider = B3Provider;
|
|
5
5
|
exports.InnerProvider = InnerProvider;
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("../../../../global-account/react");
|
|
7
8
|
const supported_1 = require("../../../../shared/constants/chains/supported");
|
|
8
9
|
const react_query_1 = require("@tanstack/react-query");
|
|
9
|
-
const
|
|
10
|
+
const react_2 = require("react");
|
|
10
11
|
const sonner_1 = require("sonner");
|
|
11
|
-
const
|
|
12
|
+
const react_3 = require("thirdweb/react");
|
|
12
13
|
const wagmi_1 = require("wagmi");
|
|
13
14
|
const RelayKitProviderWrapper_1 = require("../RelayKitProviderWrapper");
|
|
14
15
|
const StyleRoot_1 = require("../StyleRoot");
|
|
@@ -33,18 +34,18 @@ const queryClient = new react_query_1.QueryClient();
|
|
|
33
34
|
* Main B3Provider component
|
|
34
35
|
*/
|
|
35
36
|
function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, }) {
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: exports.wagmiConfig, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: exports.wagmiConfig, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_3.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: (0, jsx_runtime_1.jsx)(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, children: (0, jsx_runtime_1.jsxs)(RelayKitProviderWrapper_1.RelayKitProviderWrapper, { isMainnet: isMainnetAnySpend, children: [children, (0, jsx_runtime_1.jsx)(StyleRoot_1.StyleRoot, { id: "b3-root" }), (0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme })] }) }) }) }) }) }));
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* Inner provider component that provides the actual B3Context
|
|
40
41
|
*/
|
|
41
42
|
function InnerProvider({ children, accountOverride, environment, defaultPermissions = DEFAULT_PERMISSIONS, automaticallySetFirstEoa, theme = "light", }) {
|
|
42
|
-
const activeAccount = (0,
|
|
43
|
-
const [manuallySetAccount, setManuallySetAccount] = (0,
|
|
44
|
-
const [manuallySelectedWallet, setManuallySelectedWallet] = (0,
|
|
45
|
-
const wallets = (0,
|
|
46
|
-
const setActiveWallet = (0,
|
|
47
|
-
const [user, setUser] = (0,
|
|
43
|
+
const activeAccount = (0, react_3.useActiveAccount)();
|
|
44
|
+
const [manuallySetAccount, setManuallySetAccount] = (0, react_2.useState)(undefined);
|
|
45
|
+
const [manuallySelectedWallet, setManuallySelectedWallet] = (0, react_2.useState)(undefined);
|
|
46
|
+
const wallets = (0, react_3.useConnectedWallets)();
|
|
47
|
+
const setActiveWallet = (0, react_3.useSetActiveWallet)();
|
|
48
|
+
const [user, setUser] = (0, react_2.useState)(undefined);
|
|
48
49
|
// Use given accountOverride or activeAccount from thirdweb
|
|
49
50
|
const effectiveAccount = accountOverride || manuallySetAccount || activeAccount;
|
|
50
51
|
const setAccount = (account) => {
|
|
@@ -63,7 +64,7 @@ function InnerProvider({ children, accountOverride, environment, defaultPermissi
|
|
|
63
64
|
setWallet(firstEoa);
|
|
64
65
|
}
|
|
65
66
|
};
|
|
66
|
-
(0,
|
|
67
|
+
(0, react_2.useEffect)(() => {
|
|
67
68
|
if (automaticallySetFirstEoa) {
|
|
68
69
|
console.log("@@gio:wallets", wallets);
|
|
69
70
|
setFirstEoa();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
|
-
variant?: "link" | "default" | "
|
|
4
|
-
size?: "
|
|
3
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "b3" | null | undefined;
|
|
4
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
7
|
variant?: "default" | "outline";
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -6,7 +6,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
} & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}, "
|
|
9
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
10
|
label?: string;
|
|
11
11
|
shouldFilter?: boolean;
|
|
12
12
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -24,7 +24,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
24
24
|
ref?: React.Ref<HTMLInputElement>;
|
|
25
25
|
} & {
|
|
26
26
|
asChild?: boolean;
|
|
27
|
-
}, "
|
|
27
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
|
|
28
28
|
value?: string;
|
|
29
29
|
onValueChange?: (search: string) => void;
|
|
30
30
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -34,7 +34,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
|
34
34
|
ref?: React.Ref<HTMLDivElement>;
|
|
35
35
|
} & {
|
|
36
36
|
asChild?: boolean;
|
|
37
|
-
}, "
|
|
37
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
38
38
|
label?: string;
|
|
39
39
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
40
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -43,14 +43,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
|
43
43
|
ref?: React.Ref<HTMLDivElement>;
|
|
44
44
|
} & {
|
|
45
45
|
asChild?: boolean;
|
|
46
|
-
}, "
|
|
46
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
47
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
48
48
|
children?: React.ReactNode;
|
|
49
49
|
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
50
50
|
ref?: React.Ref<HTMLDivElement>;
|
|
51
51
|
} & {
|
|
52
52
|
asChild?: boolean;
|
|
53
|
-
}, "
|
|
53
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
54
54
|
heading?: React.ReactNode;
|
|
55
55
|
value?: string;
|
|
56
56
|
forceMount?: boolean;
|
|
@@ -59,7 +59,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
|
|
|
59
59
|
ref?: React.Ref<HTMLDivElement>;
|
|
60
60
|
} & {
|
|
61
61
|
asChild?: boolean;
|
|
62
|
-
}, "
|
|
62
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
63
63
|
alwaysRender?: boolean;
|
|
64
64
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
65
65
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -68,7 +68,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
68
68
|
ref?: React.Ref<HTMLDivElement>;
|
|
69
69
|
} & {
|
|
70
70
|
asChild?: boolean;
|
|
71
|
-
}, "
|
|
71
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
|
|
72
72
|
disabled?: boolean;
|
|
73
73
|
onSelect?: (value: string) => void;
|
|
74
74
|
value?: string;
|
|
@@ -45,6 +45,6 @@ const Tooltip = TooltipPrimitive.Root;
|
|
|
45
45
|
exports.Tooltip = Tooltip;
|
|
46
46
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
47
47
|
exports.TooltipTrigger = TooltipTrigger;
|
|
48
|
-
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, cn_1.cn)("bg-popover text-
|
|
48
|
+
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, cn_1.cn)("bg-b3-react-popover text-b3-react-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md", className), ...props })));
|
|
49
49
|
exports.TooltipContent = TooltipContent;
|
|
50
50
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
@@ -87,10 +87,10 @@ export declare const getViemChainConfig: (config: ChainNetworks) => {
|
|
|
87
87
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
88
88
|
readonly rpc: string;
|
|
89
89
|
readonly icon: {
|
|
90
|
-
format: string;
|
|
91
90
|
url: string;
|
|
92
91
|
height: number;
|
|
93
92
|
width: number;
|
|
93
|
+
format: string;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
export declare const thirdwebB3Testnet: ThirdwebChain;
|
|
@@ -2,29 +2,36 @@ import type { Chain as ThirdwebChain } from "thirdweb";
|
|
|
2
2
|
export declare const supportedChains: import("viem").Chain[];
|
|
3
3
|
export declare const supportedChainsTW: ThirdwebChain[];
|
|
4
4
|
export declare const supportedChainNetworks: {
|
|
5
|
+
testnet?: boolean | undefined;
|
|
6
|
+
color?: string | undefined;
|
|
5
7
|
contracts?: Record<string, {
|
|
6
8
|
blockCreated?: number | undefined;
|
|
7
9
|
address: string;
|
|
8
10
|
}> | undefined;
|
|
11
|
+
testnetConfigID?: number | undefined;
|
|
9
12
|
sourceId?: number | undefined;
|
|
10
|
-
testnet?: boolean | undefined;
|
|
11
|
-
fees?: Record<string, any> | undefined;
|
|
12
13
|
formatters?: Record<string, any> | undefined;
|
|
13
|
-
|
|
14
|
-
testnetConfigID?: number | undefined;
|
|
14
|
+
fees?: Record<string, any> | undefined;
|
|
15
15
|
badge?: string | undefined;
|
|
16
16
|
enabledFeatures?: string[] | undefined;
|
|
17
17
|
name: string;
|
|
18
18
|
id: number;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
icon: {
|
|
20
|
+
url: string;
|
|
21
|
+
height: number;
|
|
22
|
+
width: number;
|
|
23
|
+
format: string;
|
|
22
24
|
};
|
|
23
25
|
nativeCurrency: {
|
|
24
26
|
symbol: string;
|
|
25
27
|
name: string;
|
|
26
28
|
decimals: number;
|
|
27
29
|
};
|
|
30
|
+
blockExplorers: {
|
|
31
|
+
default: string;
|
|
32
|
+
explorerTitle: string;
|
|
33
|
+
};
|
|
34
|
+
_id: string | {};
|
|
28
35
|
rpcUrls: {
|
|
29
36
|
default: {
|
|
30
37
|
http: string;
|
|
@@ -35,13 +42,6 @@ export declare const supportedChainNetworks: {
|
|
|
35
42
|
uri: string;
|
|
36
43
|
}[];
|
|
37
44
|
};
|
|
38
|
-
icon: {
|
|
39
|
-
format: string;
|
|
40
|
-
url: string;
|
|
41
|
-
height: number;
|
|
42
|
-
width: number;
|
|
43
|
-
};
|
|
44
|
-
_id: string | {};
|
|
45
45
|
}[];
|
|
46
46
|
export declare const coingeckoChains: Record<number, {
|
|
47
47
|
coingecko_id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../shared/thirdweb/initiateClient";
|
|
2
2
|
import type * as SimpleHashTypes from "../../global-account/types/simplehash.types";
|
|
3
3
|
import type { GetV1NftsResponse, GetV1NftsTransfersByContractAddressResponse } from "../../shared/thirdweb/generated/types.gen";
|
|
4
|
-
export declare const simpleHashChainToChainName: (chain: number) => "
|
|
4
|
+
export declare const simpleHashChainToChainName: (chain: number) => "b3" | "b3-sepolia" | "base" | "base-sepolia" | null;
|
|
5
5
|
export declare function transformNFTResponse(insightsData: GetV1NftsResponse["data"]): SimpleHashTypes.SimpleHashNFTResponse;
|
|
6
6
|
export declare function transformCollectionResponse(nftData: GetV1NftsResponse["data"][0], chainId: number, chain: string, contractAddress: string): SimpleHashTypes.SimpleHashNFTResponse;
|
|
7
7
|
export declare function transformTransferResponse(response: GetV1NftsTransfersByContractAddressResponse): SimpleHashTypes.NFTTransfer[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as SimpleHashTypes from "../../global-account/types/simplehash.types";
|
|
2
2
|
export * from "../../global-account/types/simplehash.types";
|
|
3
|
-
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 |
|
|
4
|
-
export declare const simpleHashChainToChainName: (chain: number) => "
|
|
3
|
+
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 | 1993 | 84532 | null;
|
|
4
|
+
export declare const simpleHashChainToChainName: (chain: number) => "b3" | "b3-sepolia" | "base" | "base-sepolia" | null;
|
|
5
5
|
type SimpleHashRoute = `/v0/nfts/${string}/${string}/${string}` | `/v0/nfts/${string}` | `/v0/nfts/collections/${string}/${string}` | `/v0/nfts/transfers/${string}/${string}` | `/v0/fungibles/assets` | `/v0/native_tokens/balances` | string;
|
|
6
6
|
type RouteReturnType<T extends SimpleHashRoute> = T extends `/v0/nfts/collections/${string}/${string}` ? SimpleHashTypes.SimpleHashNFTResponse : T extends `/v0/nfts/transfers/${string}/${string}` ? {
|
|
7
7
|
transfers: SimpleHashTypes.NFTTransfer[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { eqci, getDefaultToken, isCustomTxMetadata, isNftMetadata, isTournamentMetadata, NftType, OrderStatus, OrderType, RELAY_ETH_ADDRESS, USDC_BASE, useAnyspendCreateOnrampOrder, useAnyspendCreateOrder, useAnyspendOrderAndTransactions, useAnyspendQuote, useAnyspendTokenList, useGeoOnrampOptions, } from "../../../anyspend/index.js";
|
|
3
|
-
import { Badge, Button, Dialog, DialogContent, Input, ShinyButton, Skeleton, StyleRoot, Tabs, TabsContent, TabsList, TabTrigger, TextShimmer, TransitionPanel, useAccountWallet, useB3, useBsmntProfile, useHasMounted, useModalStore, useRouter, useSearchParamsSSR, useTokenBalancesByChain, } from "../../../global-account/react/index.js";
|
|
3
|
+
import { Badge, Button, Dialog, DialogContent, Input, ShinyButton, Skeleton, StyleRoot, Tabs, TabsContent, TabsList, TabTrigger, TextShimmer, Tooltip, TooltipContent, TooltipTrigger, TransitionPanel, useAccountWallet, useB3, useBsmntProfile, useHasMounted, useModalStore, useRouter, useSearchParamsSSR, useTokenBalancesByChain, } from "../../../global-account/react/index.js";
|
|
4
4
|
import { cn } from "../../../shared/utils/index.js";
|
|
5
5
|
import centerTruncate from "../../../shared/utils/centerTruncate.js";
|
|
6
6
|
import { formatTokenAmount } from "../../../shared/utils/number.js";
|
|
@@ -152,19 +152,32 @@ export function AnySpendCustom({ isMainnet = true, loadOrder, mode = "modal", re
|
|
|
152
152
|
}
|
|
153
153
|
}, [srcChainId, tokenList, getTokenWithBalance, nativeTokens, fungibleTokens, dirtySelectSrcToken, dstToken.address]);
|
|
154
154
|
const { account: isAuthenticated } = useB3();
|
|
155
|
-
const getRelayQuoteRequest =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
155
|
+
const getRelayQuoteRequest = useMemo(() => {
|
|
156
|
+
return generateGetRelayQuoteRequest({
|
|
157
|
+
orderType: orderType,
|
|
158
|
+
srcChainId: srcChainId,
|
|
159
|
+
srcToken: srcToken,
|
|
160
|
+
dstChainId: dstChainId,
|
|
161
|
+
dstToken: dstToken,
|
|
162
|
+
dstAmount: dstAmount,
|
|
163
|
+
contractAddress: contractAddress,
|
|
164
|
+
tokenId: isNftMetadata(metadata) ? metadata.nftContract.tokenId : undefined,
|
|
165
|
+
contractType: isNftMetadata(metadata) ? metadata.nftContract.type : undefined,
|
|
166
|
+
encodedData: encodedData,
|
|
167
|
+
spenderAddress: spenderAddress,
|
|
168
|
+
});
|
|
169
|
+
}, [
|
|
170
|
+
contractAddress,
|
|
171
|
+
dstAmount,
|
|
172
|
+
dstChainId,
|
|
173
|
+
dstToken,
|
|
174
|
+
encodedData,
|
|
175
|
+
metadata,
|
|
176
|
+
orderType,
|
|
177
|
+
spenderAddress,
|
|
178
|
+
srcChainId,
|
|
179
|
+
srcToken,
|
|
180
|
+
]);
|
|
168
181
|
const { anyspendQuote, isLoadingAnyspendQuote } = useAnyspendQuote(isMainnet, getRelayQuoteRequest);
|
|
169
182
|
// Get geo data and onramp options (after quote is available)
|
|
170
183
|
const { geoData, isOnrampSupported } = useGeoOnrampOptions(isMainnet, anyspendQuote?.data?.currencyIn?.amountUsd || "0");
|
|
@@ -359,7 +372,7 @@ export function AnySpendCustom({ isMainnet = true, loadOrder, mode = "modal", re
|
|
|
359
372
|
} })] })), mode === "page" && _jsx("div", { className: "h-12" })] }));
|
|
360
373
|
const loadingView = (_jsxs("div", { className: cn("mx-auto flex w-full flex-col items-center gap-4 p-5", mode === "modal" && "bg-b3-react-background"), children: [_jsxs(Badge, { variant: "default", className: "bg-b3-react-muted/30 border-b3-react-border hover:bg-b3-react-muted/50 flex items-center gap-3 px-4 py-1 text-base transition-all", children: [_jsx(Loader2, { className: "text-b3-react-foreground size-4 animate-spin" }), _jsx(TextShimmer, { duration: 1, className: "font-sf-rounded text-base font-semibold", children: "Loading..." })] }), _jsxs("div", { className: "flex w-full flex-1 flex-col", children: [_jsxs("div", { className: "mb-4 flex flex-col gap-1", children: [_jsx(Skeleton, { className: "h-4 w-24" }), _jsxs("div", { className: "mt-2 flex items-center gap-2", children: [_jsx(Skeleton, { className: "h-8 w-48" }), _jsx(Skeleton, { className: "ml-4 h-8 w-32" })] }), _jsx(Skeleton, { className: "mt-4 h-8 w-24" })] }), _jsx(Skeleton, { className: "mb-4 h-12 w-full" }), _jsxs("div", { className: "flex w-full items-center justify-between gap-4", children: [_jsxs(Skeleton, { className: "rounded-lg bg-white/5 p-6 pb-3", children: [_jsx("div", { className: "size-[200px]" }), _jsx("div", { className: "mt-3 flex items-center justify-center gap-2", children: _jsx("div", { className: "size-5 rounded-full" }) })] }), _jsx("div", { className: "flex flex-1 flex-col gap-2", children: [1, 2, 3].map(i => (_jsx(Skeleton, { className: "h-10 w-full" }, i))) })] })] }), _jsxs("div", { className: "bg-b3-react-muted/30 mt-8 w-full rounded-lg p-4", children: [_jsx(Skeleton, { className: "mb-3 h-4 w-48" }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx(Skeleton, { className: "h-10 flex-1" }), _jsx(Skeleton, { className: "h-10 flex-1" })] })] }), _jsx("div", { className: "flex w-full flex-col gap-3", children: [1, 2, 3, 4, 5].map(i => (_jsxs("div", { className: "flex w-full justify-between", children: [_jsx(Skeleton, { className: "h-4 w-24" }), _jsx(Skeleton, { className: "h-4 w-32" })] }, i))) }), _jsx(Skeleton, { className: "h-10 w-full" }), mode === "page" && _jsx("div", { className: "h-12" })] }));
|
|
361
374
|
// Confirm order view.
|
|
362
|
-
const confirmOrderView = (_jsxs("div", { className: "relative mx-auto flex w-full flex-col items-center", children: [header({ anyspendPrice: anyspendQuote, isLoadingAnyspendPrice: isLoadingAnyspendQuote }), _jsx("div", { className: "divider w-full" }), _jsxs(Tabs, { value: activeTab, onValueChange: value => setActiveTab(value), className: "bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5", children: [
|
|
375
|
+
const confirmOrderView = (_jsxs("div", { className: "relative mx-auto flex w-full flex-col items-center", children: [header({ anyspendPrice: anyspendQuote, isLoadingAnyspendPrice: isLoadingAnyspendQuote }), _jsx("div", { className: "divider w-full" }), _jsxs(Tabs, { value: activeTab, onValueChange: value => setActiveTab(value), className: "bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5", children: [_jsxs(TabsList, { hideGradient: true, className: "justify-center", children: [_jsx(TabTrigger, { value: "crypto", children: _jsx("span", { className: "text-as-primary w-[140px]", children: "Pay with crypto" }) }), isOnrampSupported ? (_jsx(TabTrigger, { value: "fiat", children: _jsx("span", { className: "text-as-primary w-[140px]", children: "Pay with fiat" }) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(TabTrigger, { value: "fiat", disabled: true, children: _jsx("span", { className: "text-as-primary w-[140px]", children: "Pay with fiat" }) }) }), _jsx(TooltipContent, { children: _jsx("span", { className: "text-as-primary w-[140px]", children: "Fiat payments are not supported for this amount" }) })] }))] }), _jsx(TabsContent, { value: "crypto", children: _jsxs("div", { className: "mt-2 flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs(motion.div, { initial: false, animate: {
|
|
363
376
|
opacity: hasMounted ? 1 : 0,
|
|
364
377
|
y: hasMounted ? 0 : 20,
|
|
365
378
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function Warning({ text }) {
|
|
3
|
+
return (_jsx("div", { className: "bg-as-red/60 relative rounded border border-orange-400 px-4 py-3 text-white", role: "alert", children: _jsx("div", { className: "font-bold", children: text }) }));
|
|
4
|
+
}
|
|
@@ -20,7 +20,7 @@ import { useMemo } from "react";
|
|
|
20
20
|
*/
|
|
21
21
|
export function useAnyspendQuote(isMainnet, req) {
|
|
22
22
|
const { data, isLoading, refetch, error } = useQuery({
|
|
23
|
-
queryKey: ["useAnyspendQuote", isMainnet, req],
|
|
23
|
+
queryKey: ["useAnyspendQuote", isMainnet, JSON.stringify(req)],
|
|
24
24
|
queryFn: () => {
|
|
25
25
|
return anyspendService.getQuote(isMainnet, req);
|
|
26
26
|
},
|
|
@@ -16,8 +16,8 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
16
16
|
creator?: string | undefined;
|
|
17
17
|
signatureRequestBody?: {
|
|
18
18
|
price?: string | undefined;
|
|
19
|
-
currency?: string | undefined;
|
|
20
19
|
clonePrice?: string | undefined;
|
|
20
|
+
currency?: string | undefined;
|
|
21
21
|
primarySaleRecipient?: string | undefined;
|
|
22
22
|
royaltyRecipient?: string | undefined;
|
|
23
23
|
royaltyBps?: number | undefined;
|
|
@@ -26,10 +26,10 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
26
26
|
metadata: {
|
|
27
27
|
name?: string | undefined;
|
|
28
28
|
description?: string | undefined;
|
|
29
|
-
properties?: any;
|
|
30
29
|
image?: string | undefined;
|
|
31
30
|
externalLink?: string | undefined;
|
|
32
31
|
appUri?: string | undefined;
|
|
32
|
+
properties?: any;
|
|
33
33
|
attributes?: any;
|
|
34
34
|
backgroundColor?: string | undefined;
|
|
35
35
|
promptImageUrl?: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { TooltipProvider } from "../../../global-account/react/index.js";
|
|
3
4
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
4
5
|
import { useState } from "react";
|
|
5
6
|
const defaultQueryClientConfig = {
|
|
@@ -34,5 +35,5 @@ const defaultQueryClientConfig = {
|
|
|
34
35
|
*/
|
|
35
36
|
export const AnyspendProvider = function AnyspendProvider({ children }) {
|
|
36
37
|
const [queryClient] = useState(() => new QueryClient(defaultQueryClientConfig));
|
|
37
|
-
return _jsx(QueryClientProvider, { client: queryClient, children: children });
|
|
38
|
+
return (_jsx(QueryClientProvider, { client: queryClient, children: _jsx(TooltipProvider, { children: children }) }));
|
|
38
39
|
};
|
|
@@ -86,5 +86,5 @@ export function B3DynamicModal() {
|
|
|
86
86
|
const ModalContent = isMobile ? DrawerContent : DialogContent;
|
|
87
87
|
const ModalTitle = isMobile ? DrawerTitle : DialogTitle;
|
|
88
88
|
const ModalDescription = isMobile ? DrawerDescription : DialogDescription;
|
|
89
|
-
return (_jsx(ModalComponent, { open: isOpen, onOpenChange: setB3ModalOpen, children: _jsxs(ModalContent, { className: contentClass, hideCloseButton: hideCloseButton, children: [_jsx(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), _jsx(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), _jsxs("div", { className: "overflow-
|
|
89
|
+
return (_jsx(ModalComponent, { open: isOpen, onOpenChange: setB3ModalOpen, children: _jsxs(ModalContent, { className: contentClass, hideCloseButton: hideCloseButton, children: [_jsx(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), _jsx(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), _jsxs("div", { className: "overflow-auto", children: [history.length > 0 && contentType?.showBackButton && (_jsxs("button", { onClick: navigateBack, className: "b3-modal-back-button mb-4 flex items-center gap-2 transition-colors hover:text-white", children: [_jsx("span", { children: "\u2190" }), _jsx("span", { className: "text-sm", children: "Back" })] })), renderContent()] })] }) }));
|
|
90
90
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TooltipProvider } from "../../../../global-account/react/index.js";
|
|
2
3
|
import { supportedChains } from "../../../../shared/constants/chains/supported.js";
|
|
3
4
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
4
5
|
import { useEffect, useState } from "react";
|
|
@@ -28,7 +29,7 @@ const queryClient = new QueryClient();
|
|
|
28
29
|
* Main B3Provider component
|
|
29
30
|
*/
|
|
30
31
|
export function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, }) {
|
|
31
|
-
return (_jsx(WagmiProvider, { config: wagmiConfig, children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(ThirdwebProvider, { children: _jsx(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, children: _jsxs(RelayKitProviderWrapper, { isMainnet: isMainnetAnySpend, children: [children, _jsx(StyleRoot, { id: "b3-root" }), _jsx(Toaster, { theme: theme })] }) }) }) }) }));
|
|
32
|
+
return (_jsx(WagmiProvider, { config: wagmiConfig, children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(ThirdwebProvider, { children: _jsx(TooltipProvider, { children: _jsx(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, children: _jsxs(RelayKitProviderWrapper, { isMainnet: isMainnetAnySpend, children: [children, _jsx(StyleRoot, { id: "b3-root" }), _jsx(Toaster, { theme: theme })] }) }) }) }) }) }));
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Inner provider component that provides the actual B3Context
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
|
-
variant?: "link" | "default" | "
|
|
4
|
-
size?: "
|
|
3
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "b3" | null | undefined;
|
|
4
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
7
|
variant?: "default" | "outline";
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|