@b3dotfun/sdk 0.0.73-alpha.0 → 0.0.73-alpha.2
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 +5 -5
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +10 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/global-account/react/hooks/useTokenBalanceDirect.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalanceDirect.js +1 -0
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +6 -6
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +10 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/global-account/react/hooks/useTokenBalanceDirect.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/useTokenBalanceDirect.js +1 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/types/global-account/react/hooks/useTokenBalanceDirect.d.ts +1 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +2 -0
- package/package.json +1 -1
- package/src/anyspend/react/components/AnySpendCustom.tsx +76 -72
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +11 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
- package/src/global-account/react/hooks/useTokenBalanceDirect.tsx +2 -0
- package/src/global-account/react/stores/useModalStore.ts +2 -0
|
@@ -483,7 +483,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
483
483
|
? "Receive NFT at"
|
|
484
484
|
: orderType === "join_tournament"
|
|
485
485
|
? "Join for"
|
|
486
|
-
: "Recipient" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [recipientAddress ? ((0, jsx_runtime_1.jsx)("button", { className: (0, utils_1.cn)("text-as-tertiarry flex
|
|
486
|
+
: "Recipient" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [recipientAddress ? ((0, jsx_runtime_1.jsx)("button", { className: (0, utils_1.cn)("text-as-tertiarry flex items-center gap-2 rounded-lg"), onClick: () => setActivePanel(PanelView.RECIPIENT_SELECTION), children: (0, jsx_runtime_1.jsx)("div", { className: "text-as-tertiarry flex items-center gap-1 text-sm", children: (0, jsx_runtime_1.jsx)("span", { className: "whitespace-nowrap", children: recipientName ? (0, utils_1.formatUsername)(recipientName) : (0, formatAddress_1.shortenAddress)(recipientAddress) }) }) })) : ((0, jsx_runtime_1.jsx)("button", { className: "text-as-primary/70 flex items-center gap-1 rounded-lg", onClick: () => setActivePanel(PanelView.RECIPIENT_SELECTION), children: (0, jsx_runtime_1.jsx)("div", { className: "whitespace-nowrap text-sm font-medium", children: "Select recipient" }) })), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })] }, recipientAddress)) : null;
|
|
487
487
|
const historyView = ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("mx-auto flex w-full max-w-2xl flex-col items-center p-5", mode === "modal" && "bg-b3-react-background"), children: (0, jsx_runtime_1.jsx)(OrderHistory_1.OrderHistory, { mode: mode, onBack: () => {
|
|
488
488
|
setActivePanel(PanelView.HISTORY);
|
|
489
489
|
}, onSelectOrder: onSelectOrder }) }));
|
|
@@ -526,7 +526,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
526
526
|
opacity: hasMounted ? 1 : 0,
|
|
527
527
|
y: hasMounted ? 0 : 20,
|
|
528
528
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
529
|
-
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex
|
|
529
|
+
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex flex-wrap items-center justify-end gap-2 text-sm transition-colors hover:text-blue-700", onClick: () => setActivePanel(PanelView.CRYPTO_PAYMENT_METHOD), children: effectiveCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.CONNECT_WALLET ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [connectedAddress ? ((0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry whitespace-nowrap", children: connectedName ? (0, utils_1.formatUsername)(connectedName) : (0, formatAddress_1.shortenAddress)(connectedAddress || "") })) : ((0, jsx_runtime_1.jsx)("span", { className: "whitespace-nowrap", children: "Connect wallet" })), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : effectiveCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.TRANSFER_CRYPTO ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "whitespace-nowrap", children: "Transfer crypto" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "whitespace-nowrap", children: "Select payment method" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), recipientSection, (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-4", children: [(0, jsx_runtime_1.jsxs)(react_3.motion.div, { initial: false, animate: {
|
|
530
530
|
opacity: hasMounted ? 1 : 0,
|
|
531
531
|
y: hasMounted ? 0 : 20,
|
|
532
532
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
@@ -537,7 +537,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
537
537
|
opacity: hasMounted ? 1 : 0,
|
|
538
538
|
y: hasMounted ? 0 : 20,
|
|
539
539
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
540
|
-
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("
|
|
540
|
+
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-as-tertiarry flex flex-wrap items-center gap-1.5 text-sm", children: [(0, jsx_runtime_1.jsxs)("span", { className: "whitespace-nowrap", children: ["Total ", (0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry", children: "(with fee)" })] }), anyspendQuote?.data?.fee && ((0, jsx_runtime_1.jsx)(react_2.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(react_2.Tooltip, { children: [(0, jsx_runtime_1.jsx)(react_2.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("button", { className: "text-as-primary/40 hover:text-as-primary/60 transition-colors", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Info, { className: "h-4 w-4" }) }) }), (0, jsx_runtime_1.jsx)(react_2.TooltipContent, { side: "top", children: (0, jsx_runtime_1.jsx)(FeeBreakDown_1.FeeBreakDown, { fee: anyspendQuote.data.fee }) })] }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end gap-0.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [renderPointsBadge(), (0, jsx_runtime_1.jsxs)("span", { className: "text-as-primary whitespace-nowrap font-semibold", children: [formattedSrcAmount || "--", " ", srcToken.symbol] })] }), anyspendQuote?.data?.fee?.type === "standard_fee" && anyspendQuote.data.currencyIn?.amountUsd && ((0, jsx_runtime_1.jsxs)("span", { className: "text-as-secondary text-xs", children: ["incl. $", ((Number(anyspendQuote.data.currencyIn.amountUsd) * anyspendQuote.data.fee.finalFeeBps) /
|
|
541
541
|
10000).toFixed(2), " ", "fee"] }))] })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("flex w-full flex-col items-center justify-between gap-2"), children: (0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: false, animate: {
|
|
542
542
|
opacity: hasMounted ? 1 : 0,
|
|
543
543
|
y: hasMounted ? 0 : 20,
|
|
@@ -546,11 +546,11 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
546
546
|
opacity: hasMounted ? 1 : 0,
|
|
547
547
|
y: hasMounted ? 0 : 20,
|
|
548
548
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
549
|
-
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay with" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex
|
|
549
|
+
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay with" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex flex-wrap items-center justify-end gap-2 text-sm transition-colors hover:text-blue-700", onClick: () => setActivePanel(PanelView.FIAT_PAYMENT_METHOD), children: selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Credit/Debit Card"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "whitespace-nowrap", children: "Select payment method" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4 shrink-0" })] })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), recipientSection, (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)(react_3.motion.div, { initial: false, animate: {
|
|
550
550
|
opacity: hasMounted ? 1 : 0,
|
|
551
551
|
y: hasMounted ? 0 : 20,
|
|
552
552
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
553
|
-
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("
|
|
553
|
+
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-as-tertiarry flex flex-wrap items-center gap-1.5 text-sm", children: [(0, jsx_runtime_1.jsxs)("span", { className: "whitespace-nowrap", children: ["Total ", (0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry", children: "(USD)" })] }), anyspendQuote?.data?.fee && ((0, jsx_runtime_1.jsx)(react_2.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(react_2.Tooltip, { children: [(0, jsx_runtime_1.jsx)(react_2.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("button", { className: "text-as-primary/40 hover:text-as-primary/60 transition-colors", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Info, { className: "h-4 w-4" }) }) }), (0, jsx_runtime_1.jsx)(react_2.TooltipContent, { side: "top", children: (0, jsx_runtime_1.jsx)(FeeBreakDown_1.FeeBreakDown, { fee: anyspendQuote.data.fee }) })] }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end gap-0.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [renderPointsBadge(), (0, jsx_runtime_1.jsxs)("span", { className: "text-as-primary whitespace-nowrap text-xl font-semibold", children: ["$", srcFiatAmount || "0.00"] })] }), anyspendQuote?.data?.fee?.type === "stripeweb2_fee" && anyspendQuote.data.fee.originalAmount && ((0, jsx_runtime_1.jsxs)("span", { className: "text-as-secondary text-xs", children: ["incl. $", ((Number(anyspendQuote.data.fee.originalAmount) - Number(anyspendQuote.data.fee.finalAmount)) /
|
|
554
554
|
1e6).toFixed(2), " ", "fee"] }))] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("flex w-full flex-col items-center justify-between gap-2"), children: (0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: false, animate: {
|
|
555
555
|
opacity: hasMounted ? 1 : 0,
|
|
556
556
|
y: hasMounted ? 0 : 20,
|
|
@@ -18,6 +18,7 @@ export interface AnySpendCustomExactInProps {
|
|
|
18
18
|
destinationToken: components["schemas"]["Token"];
|
|
19
19
|
destinationChainId: number;
|
|
20
20
|
onSuccess?: (amount: string) => void;
|
|
21
|
+
onOpenCustomModal?: () => void;
|
|
21
22
|
mainFooter?: React.ReactNode;
|
|
22
23
|
onTokenSelect?: (token: components["schemas"]["Token"], event: {
|
|
23
24
|
preventDefault: () => void;
|
|
@@ -15,6 +15,7 @@ const react_2 = require("motion/react");
|
|
|
15
15
|
const react_3 = require("react");
|
|
16
16
|
const sonner_1 = require("sonner");
|
|
17
17
|
const react_4 = require("thirdweb/react");
|
|
18
|
+
const constants_1 = require("../../constants");
|
|
18
19
|
const useAnyspendFlow_1 = require("../hooks/useAnyspendFlow");
|
|
19
20
|
const AnySpendFingerprintWrapper_1 = require("./AnySpendFingerprintWrapper");
|
|
20
21
|
const CryptoPaySection_1 = require("./common/CryptoPaySection");
|
|
@@ -31,7 +32,7 @@ function AnySpendCustomExactIn(props) {
|
|
|
31
32
|
const fingerprintConfig = (0, AnySpendFingerprintWrapper_1.getFingerprintConfig)();
|
|
32
33
|
return ((0, jsx_runtime_1.jsx)(AnySpendFingerprintWrapper_1.AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: (0, jsx_runtime_1.jsx)(AnySpendCustomExactInInner, { ...props }) }));
|
|
33
34
|
}
|
|
34
|
-
function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, destinationToken, destinationChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, customExactInConfig, orderType = "custom_exact_in", minDestinationAmount, header, }) {
|
|
35
|
+
function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, destinationToken, destinationChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, customExactInConfig, orderType = "custom_exact_in", minDestinationAmount, header, }) {
|
|
35
36
|
const actionLabel = customExactInConfig?.action ?? "Custom Execution";
|
|
36
37
|
const DESTINATION_TOKEN_DETAILS = {
|
|
37
38
|
SYMBOL: destinationToken.symbol ?? "TOKEN",
|
|
@@ -88,6 +89,9 @@ function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddres
|
|
|
88
89
|
const btnInfo = (0, react_3.useMemo)(() => {
|
|
89
90
|
if (activeInputAmountInWei === "0")
|
|
90
91
|
return { text: "Enter an amount", disable: true, error: false, loading: false };
|
|
92
|
+
if (orderType === "hype_duel" && selectedSrcToken?.address?.toLowerCase() === constants_1.B3_TOKEN.address.toLowerCase()) {
|
|
93
|
+
return { text: "Convert to HYPE using B3", disable: false, error: false, loading: false };
|
|
94
|
+
}
|
|
91
95
|
if (isLoadingAnyspendQuote)
|
|
92
96
|
return { text: "Loading quote...", disable: true, error: false, loading: true };
|
|
93
97
|
if (isCreatingOrder || isCreatingOnrampOrder)
|
|
@@ -150,8 +154,13 @@ function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddres
|
|
|
150
154
|
minDestinationAmount,
|
|
151
155
|
DESTINATION_TOKEN_DETAILS.SYMBOL,
|
|
152
156
|
orderType,
|
|
157
|
+
selectedSrcToken,
|
|
153
158
|
]);
|
|
154
159
|
const onMainButtonClick = async () => {
|
|
160
|
+
if (orderType === "hype_duel" && selectedSrcToken?.address?.toLowerCase() === constants_1.B3_TOKEN.address.toLowerCase()) {
|
|
161
|
+
onOpenCustomModal?.();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
155
164
|
if (btnInfo.disable)
|
|
156
165
|
return;
|
|
157
166
|
if (!selectedRecipientOrDefault) {
|
|
@@ -11,6 +11,7 @@ export interface AnySpendDepositHypeProps {
|
|
|
11
11
|
sourceTokenAddress?: string;
|
|
12
12
|
sourceTokenChainId?: number;
|
|
13
13
|
onSuccess?: () => void;
|
|
14
|
+
onOpenCustomModal?: () => void;
|
|
14
15
|
mainFooter?: React.ReactNode;
|
|
15
16
|
/**
|
|
16
17
|
* Called when a token is selected. Call event.preventDefault() to prevent default token selection behavior.
|
|
@@ -22,4 +23,4 @@ export interface AnySpendDepositHypeProps {
|
|
|
22
23
|
customUsdInputValues?: string[];
|
|
23
24
|
preferEoa?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -10,7 +10,7 @@ exports.HYPE_TOKEN_DETAILS = {
|
|
|
10
10
|
SYMBOL: "HYPE",
|
|
11
11
|
LOGO_URI: "https://cdn.hypeduel.com/hypes-coin.svg",
|
|
12
12
|
};
|
|
13
|
-
function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }) {
|
|
13
|
+
function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }) {
|
|
14
14
|
if (!recipientAddress)
|
|
15
15
|
return null;
|
|
16
16
|
const header = () => ((0, jsx_runtime_1.jsx)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h1", { className: "text-as-primary text-xl font-bold", children: paymentType === "crypto" ? "Deposit Crypto" : "Fund with Fiat" }) }) }));
|
|
@@ -23,5 +23,5 @@ function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paym
|
|
|
23
23
|
logoURI: exports.HYPE_TOKEN_DETAILS.LOGO_URI,
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: hypeToken, destinationChainId: chains_1.base.id, orderType: "hype_duel", minDestinationAmount: 10, header: header, onSuccess: onSuccess, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa }));
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(AnySpendCustomExactIn_1.AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: hypeToken, destinationChainId: chains_1.base.id, orderType: "hype_duel", minDestinationAmount: 10, header: header, onSuccess: onSuccess, onOpenCustomModal: onOpenCustomModal, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa }));
|
|
27
27
|
}
|
|
@@ -7,6 +7,7 @@ export interface TokenBalanceResult {
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
formattedBalance: string;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
+
refetch: () => void;
|
|
10
11
|
}
|
|
11
12
|
export declare function useTokenBalanceDirect({ token, address }: UseTokenBalanceProps): TokenBalanceResult;
|
|
12
13
|
export {};
|
|
@@ -364,6 +364,8 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
364
364
|
mainFooter?: React.ReactNode;
|
|
365
365
|
/** Callback function called when the deposit is successful */
|
|
366
366
|
onSuccess?: (amount?: string) => void;
|
|
367
|
+
/** Callback function trigger open custom modal */
|
|
368
|
+
onOpenCustomModal?: () => void;
|
|
367
369
|
/** Custom USD input values for quick amount buttons in fiat onramp */
|
|
368
370
|
customUsdInputValues?: string[];
|
|
369
371
|
/** prefer eoa wallet */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { eqci, getDefaultToken, roundUpUSDCBaseAmountToNearest } from "../../../anyspend/index.js";
|
|
3
3
|
import { RELAY_ETH_ADDRESS, USDC_BASE } from "../../../anyspend/constants/index.js";
|
|
4
4
|
import { useAnyspendCreateOnrampOrder, useAnyspendCreateOrder, useAnyspendOrderAndTransactions, useAnyspendQuote, useAnyspendTokenList, useConnectedUserProfile, useGeoOnrampOptions, } from "../../../anyspend/react/index.js";
|
|
@@ -444,7 +444,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
444
444
|
? "Receive NFT at"
|
|
445
445
|
: orderType === "join_tournament"
|
|
446
446
|
? "Join for"
|
|
447
|
-
: "Recipient" }), _jsxs("div", { className: "flex items-center gap-2", children: [recipientAddress ? (_jsx("button", { className: cn("text-as-tertiarry flex
|
|
447
|
+
: "Recipient" }), _jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [recipientAddress ? (_jsx("button", { className: cn("text-as-tertiarry flex items-center gap-2 rounded-lg"), onClick: () => setActivePanel(PanelView.RECIPIENT_SELECTION), children: _jsx("div", { className: "text-as-tertiarry flex items-center gap-1 text-sm", children: _jsx("span", { className: "whitespace-nowrap", children: recipientName ? formatUsername(recipientName) : shortenAddress(recipientAddress) }) }) })) : (_jsx("button", { className: "text-as-primary/70 flex items-center gap-1 rounded-lg", onClick: () => setActivePanel(PanelView.RECIPIENT_SELECTION), children: _jsx("div", { className: "whitespace-nowrap text-sm font-medium", children: "Select recipient" }) })), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })] }, recipientAddress)) : null;
|
|
448
448
|
const historyView = (_jsx("div", { className: cn("mx-auto flex w-full max-w-2xl flex-col items-center p-5", mode === "modal" && "bg-b3-react-background"), children: _jsx(OrderHistory, { mode: mode, onBack: () => {
|
|
449
449
|
setActivePanel(PanelView.HISTORY);
|
|
450
450
|
}, onSelectOrder: onSelectOrder }) }));
|
|
@@ -487,7 +487,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
487
487
|
opacity: hasMounted ? 1 : 0,
|
|
488
488
|
y: hasMounted ? 0 : 20,
|
|
489
489
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
490
|
-
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [_jsx("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay" }), _jsx("button", { className: "text-as-tertiarry flex
|
|
490
|
+
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [_jsx("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay" }), _jsx("button", { className: "text-as-tertiarry flex flex-wrap items-center justify-end gap-2 text-sm transition-colors hover:text-blue-700", onClick: () => setActivePanel(PanelView.CRYPTO_PAYMENT_METHOD), children: effectiveCryptoPaymentMethod === CryptoPaymentMethodType.CONNECT_WALLET ? (_jsxs(_Fragment, { children: [connectedAddress ? (_jsx("span", { className: "text-as-tertiarry whitespace-nowrap", children: connectedName ? formatUsername(connectedName) : shortenAddress(connectedAddress || "") })) : (_jsx("span", { className: "whitespace-nowrap", children: "Connect wallet" })), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : effectiveCryptoPaymentMethod === CryptoPaymentMethodType.TRANSFER_CRYPTO ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "whitespace-nowrap", children: "Transfer crypto" }), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "whitespace-nowrap", children: "Select payment method" }), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })) })] }), _jsx("div", { className: "divider w-full" }), recipientSection, _jsx("div", { className: "divider w-full" }), _jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs(motion.div, { initial: false, animate: {
|
|
491
491
|
opacity: hasMounted ? 1 : 0,
|
|
492
492
|
y: hasMounted ? 0 : 20,
|
|
493
493
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
@@ -498,7 +498,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
498
498
|
opacity: hasMounted ? 1 : 0,
|
|
499
499
|
y: hasMounted ? 0 : 20,
|
|
500
500
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
501
|
-
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [_jsxs("
|
|
501
|
+
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between gap-4", children: [_jsxs("span", { className: "text-as-tertiarry flex flex-wrap items-center gap-1.5 text-sm", children: [_jsxs("span", { className: "whitespace-nowrap", children: ["Total ", _jsx("span", { className: "text-as-tertiarry", children: "(with fee)" })] }), anyspendQuote?.data?.fee && (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { className: "text-as-primary/40 hover:text-as-primary/60 transition-colors", children: _jsx(Info, { className: "h-4 w-4" }) }) }), _jsx(TooltipContent, { side: "top", children: _jsx(FeeBreakDown, { fee: anyspendQuote.data.fee }) })] }) }))] }), _jsxs("div", { className: "flex flex-col items-end gap-0.5", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [renderPointsBadge(), _jsxs("span", { className: "text-as-primary whitespace-nowrap font-semibold", children: [formattedSrcAmount || "--", " ", srcToken.symbol] })] }), anyspendQuote?.data?.fee?.type === "standard_fee" && anyspendQuote.data.currencyIn?.amountUsd && (_jsxs("span", { className: "text-as-secondary text-xs", children: ["incl. $", ((Number(anyspendQuote.data.currencyIn.amountUsd) * anyspendQuote.data.fee.finalFeeBps) /
|
|
502
502
|
10000).toFixed(2), " ", "fee"] }))] })] })] })] }), _jsx("div", { className: cn("flex w-full flex-col items-center justify-between gap-2"), children: _jsx(motion.div, { initial: false, animate: {
|
|
503
503
|
opacity: hasMounted ? 1 : 0,
|
|
504
504
|
y: hasMounted ? 0 : 20,
|
|
@@ -507,11 +507,11 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
507
507
|
opacity: hasMounted ? 1 : 0,
|
|
508
508
|
y: hasMounted ? 0 : 20,
|
|
509
509
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
510
|
-
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [_jsx("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay with" }), _jsx("button", { className: "text-as-tertiarry flex
|
|
510
|
+
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [_jsx("div", { className: "text-as-tertiarry flex h-7 items-center text-sm", children: "Pay with" }), _jsx("button", { className: "text-as-tertiarry flex flex-wrap items-center justify-end gap-2 text-sm transition-colors hover:text-blue-700", onClick: () => setActivePanel(PanelView.FIAT_PAYMENT_METHOD), children: selectedFiatPaymentMethod === FiatPaymentMethod.COINBASE_PAY ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [_jsx("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-blue-600", children: _jsx("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : selectedFiatPaymentMethod === FiatPaymentMethod.STRIPE ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [_jsx("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-blue-600", children: _jsx("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Credit/Debit Card"] }), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "whitespace-nowrap", children: "Select payment method" }), _jsx(ChevronRight, { className: "h-4 w-4 shrink-0" })] })) })] }), _jsx("div", { className: "divider w-full" }), recipientSection, _jsx("div", { className: "divider w-full" }), _jsxs(motion.div, { initial: false, animate: {
|
|
511
511
|
opacity: hasMounted ? 1 : 0,
|
|
512
512
|
y: hasMounted ? 0 : 20,
|
|
513
513
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
514
|
-
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between", children: [_jsxs("
|
|
514
|
+
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "relative flex w-full items-center justify-between gap-4", children: [_jsxs("span", { className: "text-as-tertiarry flex flex-wrap items-center gap-1.5 text-sm", children: [_jsxs("span", { className: "whitespace-nowrap", children: ["Total ", _jsx("span", { className: "text-as-tertiarry", children: "(USD)" })] }), anyspendQuote?.data?.fee && (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { className: "text-as-primary/40 hover:text-as-primary/60 transition-colors", children: _jsx(Info, { className: "h-4 w-4" }) }) }), _jsx(TooltipContent, { side: "top", children: _jsx(FeeBreakDown, { fee: anyspendQuote.data.fee }) })] }) }))] }), _jsxs("div", { className: "flex flex-col items-end gap-0.5", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [renderPointsBadge(), _jsxs("span", { className: "text-as-primary whitespace-nowrap text-xl font-semibold", children: ["$", srcFiatAmount || "0.00"] })] }), anyspendQuote?.data?.fee?.type === "stripeweb2_fee" && anyspendQuote.data.fee.originalAmount && (_jsxs("span", { className: "text-as-secondary text-xs", children: ["incl. $", ((Number(anyspendQuote.data.fee.originalAmount) - Number(anyspendQuote.data.fee.finalAmount)) /
|
|
515
515
|
1e6).toFixed(2), " ", "fee"] }))] })] })] }), _jsx("div", { className: cn("flex w-full flex-col items-center justify-between gap-2"), children: _jsx(motion.div, { initial: false, animate: {
|
|
516
516
|
opacity: hasMounted ? 1 : 0,
|
|
517
517
|
y: hasMounted ? 0 : 20,
|
|
@@ -18,6 +18,7 @@ export interface AnySpendCustomExactInProps {
|
|
|
18
18
|
destinationToken: components["schemas"]["Token"];
|
|
19
19
|
destinationChainId: number;
|
|
20
20
|
onSuccess?: (amount: string) => void;
|
|
21
|
+
onOpenCustomModal?: () => void;
|
|
21
22
|
mainFooter?: React.ReactNode;
|
|
22
23
|
onTokenSelect?: (token: components["schemas"]["Token"], event: {
|
|
23
24
|
preventDefault: () => void;
|
|
@@ -9,6 +9,7 @@ import { motion } from "motion/react";
|
|
|
9
9
|
import { useEffect, useMemo, useRef } from "react";
|
|
10
10
|
import { toast } from "sonner";
|
|
11
11
|
import { useSetActiveWallet } from "thirdweb/react";
|
|
12
|
+
import { B3_TOKEN } from "../../constants/index.js";
|
|
12
13
|
import { PanelView, useAnyspendFlow } from "../hooks/useAnyspendFlow.js";
|
|
13
14
|
import { AnySpendFingerprintWrapper, getFingerprintConfig } from "./AnySpendFingerprintWrapper.js";
|
|
14
15
|
import { CryptoPaySection } from "./common/CryptoPaySection.js";
|
|
@@ -25,7 +26,7 @@ export function AnySpendCustomExactIn(props) {
|
|
|
25
26
|
const fingerprintConfig = getFingerprintConfig();
|
|
26
27
|
return (_jsx(AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: _jsx(AnySpendCustomExactInInner, { ...props }) }));
|
|
27
28
|
}
|
|
28
|
-
function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, destinationToken, destinationChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, customExactInConfig, orderType = "custom_exact_in", minDestinationAmount, header, }) {
|
|
29
|
+
function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, destinationToken, destinationChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, customExactInConfig, orderType = "custom_exact_in", minDestinationAmount, header, }) {
|
|
29
30
|
const actionLabel = customExactInConfig?.action ?? "Custom Execution";
|
|
30
31
|
const DESTINATION_TOKEN_DETAILS = {
|
|
31
32
|
SYMBOL: destinationToken.symbol ?? "TOKEN",
|
|
@@ -82,6 +83,9 @@ function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddres
|
|
|
82
83
|
const btnInfo = useMemo(() => {
|
|
83
84
|
if (activeInputAmountInWei === "0")
|
|
84
85
|
return { text: "Enter an amount", disable: true, error: false, loading: false };
|
|
86
|
+
if (orderType === "hype_duel" && selectedSrcToken?.address?.toLowerCase() === B3_TOKEN.address.toLowerCase()) {
|
|
87
|
+
return { text: "Convert to HYPE using B3", disable: false, error: false, loading: false };
|
|
88
|
+
}
|
|
85
89
|
if (isLoadingAnyspendQuote)
|
|
86
90
|
return { text: "Loading quote...", disable: true, error: false, loading: true };
|
|
87
91
|
if (isCreatingOrder || isCreatingOnrampOrder)
|
|
@@ -144,8 +148,13 @@ function AnySpendCustomExactInInner({ loadOrder, mode = "modal", recipientAddres
|
|
|
144
148
|
minDestinationAmount,
|
|
145
149
|
DESTINATION_TOKEN_DETAILS.SYMBOL,
|
|
146
150
|
orderType,
|
|
151
|
+
selectedSrcToken,
|
|
147
152
|
]);
|
|
148
153
|
const onMainButtonClick = async () => {
|
|
154
|
+
if (orderType === "hype_duel" && selectedSrcToken?.address?.toLowerCase() === B3_TOKEN.address.toLowerCase()) {
|
|
155
|
+
onOpenCustomModal?.();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
149
158
|
if (btnInfo.disable)
|
|
150
159
|
return;
|
|
151
160
|
if (!selectedRecipientOrDefault) {
|
|
@@ -11,6 +11,7 @@ export interface AnySpendDepositHypeProps {
|
|
|
11
11
|
sourceTokenAddress?: string;
|
|
12
12
|
sourceTokenChainId?: number;
|
|
13
13
|
onSuccess?: () => void;
|
|
14
|
+
onOpenCustomModal?: () => void;
|
|
14
15
|
mainFooter?: React.ReactNode;
|
|
15
16
|
/**
|
|
16
17
|
* Called when a token is selected. Call event.preventDefault() to prevent default token selection behavior.
|
|
@@ -22,4 +23,4 @@ export interface AnySpendDepositHypeProps {
|
|
|
22
23
|
customUsdInputValues?: string[];
|
|
23
24
|
preferEoa?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -6,7 +6,7 @@ export const HYPE_TOKEN_DETAILS = {
|
|
|
6
6
|
SYMBOL: "HYPE",
|
|
7
7
|
LOGO_URI: "https://cdn.hypeduel.com/hypes-coin.svg",
|
|
8
8
|
};
|
|
9
|
-
export function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }) {
|
|
9
|
+
export function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }) {
|
|
10
10
|
if (!recipientAddress)
|
|
11
11
|
return null;
|
|
12
12
|
const header = () => (_jsx("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: _jsx("div", { children: _jsx("h1", { className: "text-as-primary text-xl font-bold", children: paymentType === "crypto" ? "Deposit Crypto" : "Fund with Fiat" }) }) }));
|
|
@@ -19,5 +19,5 @@ export function AnySpendDepositHype({ loadOrder, mode = "modal", recipientAddres
|
|
|
19
19
|
logoURI: HYPE_TOKEN_DETAILS.LOGO_URI,
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
-
return (_jsx(AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: hypeToken, destinationChainId: base.id, orderType: "hype_duel", minDestinationAmount: 10, header: header, onSuccess: onSuccess, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa }));
|
|
22
|
+
return (_jsx(AnySpendCustomExactIn, { loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, paymentType: paymentType, sourceTokenAddress: sourceTokenAddress, sourceTokenChainId: sourceTokenChainId, destinationToken: hypeToken, destinationChainId: base.id, orderType: "hype_duel", minDestinationAmount: 10, header: header, onSuccess: onSuccess, onOpenCustomModal: onOpenCustomModal, mainFooter: mainFooter, onTokenSelect: onTokenSelect, customUsdInputValues: customUsdInputValues, preferEoa: preferEoa }));
|
|
23
23
|
}
|
|
@@ -7,6 +7,7 @@ export interface TokenBalanceResult {
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
formattedBalance: string;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
+
refetch: () => void;
|
|
10
11
|
}
|
|
11
12
|
export declare function useTokenBalanceDirect({ token, address }: UseTokenBalanceProps): TokenBalanceResult;
|
|
12
13
|
export {};
|
|
@@ -364,6 +364,8 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
364
364
|
mainFooter?: React.ReactNode;
|
|
365
365
|
/** Callback function called when the deposit is successful */
|
|
366
366
|
onSuccess?: (amount?: string) => void;
|
|
367
|
+
/** Callback function trigger open custom modal */
|
|
368
|
+
onOpenCustomModal?: () => void;
|
|
367
369
|
/** Custom USD input values for quick amount buttons in fiat onramp */
|
|
368
370
|
customUsdInputValues?: string[];
|
|
369
371
|
/** prefer eoa wallet */
|
|
@@ -18,6 +18,7 @@ export interface AnySpendCustomExactInProps {
|
|
|
18
18
|
destinationToken: components["schemas"]["Token"];
|
|
19
19
|
destinationChainId: number;
|
|
20
20
|
onSuccess?: (amount: string) => void;
|
|
21
|
+
onOpenCustomModal?: () => void;
|
|
21
22
|
mainFooter?: React.ReactNode;
|
|
22
23
|
onTokenSelect?: (token: components["schemas"]["Token"], event: {
|
|
23
24
|
preventDefault: () => void;
|
|
@@ -11,6 +11,7 @@ export interface AnySpendDepositHypeProps {
|
|
|
11
11
|
sourceTokenAddress?: string;
|
|
12
12
|
sourceTokenChainId?: number;
|
|
13
13
|
onSuccess?: () => void;
|
|
14
|
+
onOpenCustomModal?: () => void;
|
|
14
15
|
mainFooter?: React.ReactNode;
|
|
15
16
|
/**
|
|
16
17
|
* Called when a token is selected. Call event.preventDefault() to prevent default token selection behavior.
|
|
@@ -22,4 +23,4 @@ export interface AnySpendDepositHypeProps {
|
|
|
22
23
|
customUsdInputValues?: string[];
|
|
23
24
|
preferEoa?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function AnySpendDepositHype({ loadOrder, mode, recipientAddress, paymentType, sourceTokenAddress, sourceTokenChainId, onSuccess, onOpenCustomModal, mainFooter, onTokenSelect, customUsdInputValues, preferEoa, }: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,6 +7,7 @@ export interface TokenBalanceResult {
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
formattedBalance: string;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
+
refetch: () => void;
|
|
10
11
|
}
|
|
11
12
|
export declare function useTokenBalanceDirect({ token, address }: UseTokenBalanceProps): TokenBalanceResult;
|
|
12
13
|
export {};
|
|
@@ -364,6 +364,8 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
364
364
|
mainFooter?: React.ReactNode;
|
|
365
365
|
/** Callback function called when the deposit is successful */
|
|
366
366
|
onSuccess?: (amount?: string) => void;
|
|
367
|
+
/** Callback function trigger open custom modal */
|
|
368
|
+
onOpenCustomModal?: () => void;
|
|
367
369
|
/** Custom USD input values for quick amount buttons in fiat onramp */
|
|
368
370
|
customUsdInputValues?: string[];
|
|
369
371
|
/** prefer eoa wallet */
|
package/package.json
CHANGED
|
@@ -643,27 +643,27 @@ function AnySpendCustomInner({
|
|
|
643
643
|
? "Join for"
|
|
644
644
|
: "Recipient"}
|
|
645
645
|
</div>
|
|
646
|
-
<div className="flex items-center gap-2">
|
|
646
|
+
<div className="flex flex-wrap items-center justify-end gap-2">
|
|
647
647
|
{recipientAddress ? (
|
|
648
648
|
<button
|
|
649
|
-
className={cn("text-as-tertiarry flex
|
|
649
|
+
className={cn("text-as-tertiarry flex items-center gap-2 rounded-lg")}
|
|
650
650
|
onClick={() => setActivePanel(PanelView.RECIPIENT_SELECTION)}
|
|
651
651
|
>
|
|
652
|
-
|
|
653
|
-
<
|
|
654
|
-
|
|
655
|
-
</
|
|
656
|
-
|
|
652
|
+
<div className="text-as-tertiarry flex items-center gap-1 text-sm">
|
|
653
|
+
<span className="whitespace-nowrap">
|
|
654
|
+
{recipientName ? formatUsername(recipientName) : shortenAddress(recipientAddress)}
|
|
655
|
+
</span>
|
|
656
|
+
</div>
|
|
657
657
|
</button>
|
|
658
658
|
) : (
|
|
659
659
|
<button
|
|
660
660
|
className="text-as-primary/70 flex items-center gap-1 rounded-lg"
|
|
661
661
|
onClick={() => setActivePanel(PanelView.RECIPIENT_SELECTION)}
|
|
662
662
|
>
|
|
663
|
-
<div className="text-sm font-medium">Select recipient</div>
|
|
663
|
+
<div className="whitespace-nowrap text-sm font-medium">Select recipient</div>
|
|
664
664
|
</button>
|
|
665
665
|
)}
|
|
666
|
-
<ChevronRight className="h-4 w-4" />
|
|
666
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
667
667
|
</div>
|
|
668
668
|
</motion.div>
|
|
669
669
|
) : null;
|
|
@@ -913,31 +913,29 @@ function AnySpendCustomInner({
|
|
|
913
913
|
>
|
|
914
914
|
<div className="text-as-tertiarry flex h-7 items-center text-sm">Pay</div>
|
|
915
915
|
<button
|
|
916
|
-
className="text-as-tertiarry flex
|
|
916
|
+
className="text-as-tertiarry flex flex-wrap items-center justify-end gap-2 text-sm transition-colors hover:text-blue-700"
|
|
917
917
|
onClick={() => setActivePanel(PanelView.CRYPTO_PAYMENT_METHOD)}
|
|
918
918
|
>
|
|
919
919
|
{effectiveCryptoPaymentMethod === CryptoPaymentMethodType.CONNECT_WALLET ? (
|
|
920
920
|
<>
|
|
921
921
|
{connectedAddress ? (
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
</span>
|
|
926
|
-
</>
|
|
922
|
+
<span className="text-as-tertiarry whitespace-nowrap">
|
|
923
|
+
{connectedName ? formatUsername(connectedName) : shortenAddress(connectedAddress || "")}
|
|
924
|
+
</span>
|
|
927
925
|
) : (
|
|
928
|
-
"Connect wallet
|
|
926
|
+
<span className="whitespace-nowrap">Connect wallet</span>
|
|
929
927
|
)}
|
|
930
|
-
<ChevronRight className="h-4 w-4" />
|
|
928
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
931
929
|
</>
|
|
932
930
|
) : effectiveCryptoPaymentMethod === CryptoPaymentMethodType.TRANSFER_CRYPTO ? (
|
|
933
931
|
<>
|
|
934
|
-
Transfer crypto
|
|
935
|
-
<ChevronRight className="h-4 w-4" />
|
|
932
|
+
<span className="whitespace-nowrap">Transfer crypto</span>
|
|
933
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
936
934
|
</>
|
|
937
935
|
) : (
|
|
938
936
|
<>
|
|
939
|
-
Select payment method
|
|
940
|
-
<ChevronRight className="h-4 w-4" />
|
|
937
|
+
<span className="whitespace-nowrap">Select payment method</span>
|
|
938
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
941
939
|
</>
|
|
942
940
|
)}
|
|
943
941
|
</button>
|
|
@@ -985,32 +983,34 @@ function AnySpendCustomInner({
|
|
|
985
983
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
986
984
|
}}
|
|
987
985
|
transition={{ duration: 0.3, delay: 0.1, ease: "easeInOut" }}
|
|
988
|
-
className="relative flex w-full items-center justify-between"
|
|
986
|
+
className="relative flex w-full items-center justify-between gap-4"
|
|
989
987
|
>
|
|
990
|
-
<
|
|
991
|
-
<span className="
|
|
988
|
+
<span className="text-as-tertiarry flex flex-wrap items-center gap-1.5 text-sm">
|
|
989
|
+
<span className="whitespace-nowrap">
|
|
992
990
|
Total <span className="text-as-tertiarry">(with fee)</span>
|
|
993
|
-
{anyspendQuote?.data?.fee && (
|
|
994
|
-
<TooltipProvider>
|
|
995
|
-
<Tooltip>
|
|
996
|
-
<TooltipTrigger asChild>
|
|
997
|
-
<button className="text-as-primary/40 hover:text-as-primary/60 transition-colors">
|
|
998
|
-
<Info className="h-4 w-4" />
|
|
999
|
-
</button>
|
|
1000
|
-
</TooltipTrigger>
|
|
1001
|
-
<TooltipContent side="top">
|
|
1002
|
-
<FeeBreakDown fee={anyspendQuote.data.fee} />
|
|
1003
|
-
</TooltipContent>
|
|
1004
|
-
</Tooltip>
|
|
1005
|
-
</TooltipProvider>
|
|
1006
|
-
)}
|
|
1007
991
|
</span>
|
|
1008
|
-
{
|
|
1009
|
-
|
|
992
|
+
{anyspendQuote?.data?.fee && (
|
|
993
|
+
<TooltipProvider>
|
|
994
|
+
<Tooltip>
|
|
995
|
+
<TooltipTrigger asChild>
|
|
996
|
+
<button className="text-as-primary/40 hover:text-as-primary/60 transition-colors">
|
|
997
|
+
<Info className="h-4 w-4" />
|
|
998
|
+
</button>
|
|
999
|
+
</TooltipTrigger>
|
|
1000
|
+
<TooltipContent side="top">
|
|
1001
|
+
<FeeBreakDown fee={anyspendQuote.data.fee} />
|
|
1002
|
+
</TooltipContent>
|
|
1003
|
+
</Tooltip>
|
|
1004
|
+
</TooltipProvider>
|
|
1005
|
+
)}
|
|
1006
|
+
</span>
|
|
1010
1007
|
<div className="flex flex-col items-end gap-0.5">
|
|
1011
|
-
<
|
|
1012
|
-
{
|
|
1013
|
-
|
|
1008
|
+
<div className="flex flex-wrap items-center justify-end gap-2">
|
|
1009
|
+
{renderPointsBadge()}
|
|
1010
|
+
<span className="text-as-primary whitespace-nowrap font-semibold">
|
|
1011
|
+
{formattedSrcAmount || "--"} {srcToken.symbol}
|
|
1012
|
+
</span>
|
|
1013
|
+
</div>
|
|
1014
1014
|
{anyspendQuote?.data?.fee?.type === "standard_fee" && anyspendQuote.data.currencyIn?.amountUsd && (
|
|
1015
1015
|
<span className="text-as-secondary text-xs">
|
|
1016
1016
|
incl. $
|
|
@@ -1090,33 +1090,33 @@ function AnySpendCustomInner({
|
|
|
1090
1090
|
>
|
|
1091
1091
|
<div className="text-as-tertiarry flex h-7 items-center text-sm">Pay with</div>
|
|
1092
1092
|
<button
|
|
1093
|
-
className="text-as-tertiarry flex
|
|
1093
|
+
className="text-as-tertiarry flex flex-wrap items-center justify-end gap-2 text-sm transition-colors hover:text-blue-700"
|
|
1094
1094
|
onClick={() => setActivePanel(PanelView.FIAT_PAYMENT_METHOD)}
|
|
1095
1095
|
>
|
|
1096
1096
|
{selectedFiatPaymentMethod === FiatPaymentMethod.COINBASE_PAY ? (
|
|
1097
1097
|
<>
|
|
1098
|
-
<div className="flex items-center gap-2">
|
|
1099
|
-
<div className="flex h-5 w-5 items-center justify-center rounded-full bg-blue-600">
|
|
1098
|
+
<div className="flex items-center gap-2 whitespace-nowrap">
|
|
1099
|
+
<div className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-blue-600">
|
|
1100
1100
|
<span className="text-xs font-bold text-white">C</span>
|
|
1101
1101
|
</div>
|
|
1102
1102
|
Coinbase Pay
|
|
1103
1103
|
</div>
|
|
1104
|
-
<ChevronRight className="h-4 w-4" />
|
|
1104
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
1105
1105
|
</>
|
|
1106
1106
|
) : selectedFiatPaymentMethod === FiatPaymentMethod.STRIPE ? (
|
|
1107
1107
|
<>
|
|
1108
|
-
<div className="flex items-center gap-2">
|
|
1109
|
-
<div className="flex h-5 w-5 items-center justify-center rounded-full bg-blue-600">
|
|
1108
|
+
<div className="flex items-center gap-2 whitespace-nowrap">
|
|
1109
|
+
<div className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-blue-600">
|
|
1110
1110
|
<span className="text-xs font-bold text-white">S</span>
|
|
1111
1111
|
</div>
|
|
1112
1112
|
Credit/Debit Card
|
|
1113
1113
|
</div>
|
|
1114
|
-
<ChevronRight className="h-4 w-4" />
|
|
1114
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
1115
1115
|
</>
|
|
1116
1116
|
) : (
|
|
1117
1117
|
<>
|
|
1118
|
-
Select payment method
|
|
1119
|
-
<ChevronRight className="h-4 w-4" />
|
|
1118
|
+
<span className="whitespace-nowrap">Select payment method</span>
|
|
1119
|
+
<ChevronRight className="h-4 w-4 shrink-0" />
|
|
1120
1120
|
</>
|
|
1121
1121
|
)}
|
|
1122
1122
|
</button>
|
|
@@ -1137,30 +1137,34 @@ function AnySpendCustomInner({
|
|
|
1137
1137
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
1138
1138
|
}}
|
|
1139
1139
|
transition={{ duration: 0.3, delay: 0.1, ease: "easeInOut" }}
|
|
1140
|
-
className="relative flex w-full items-center justify-between"
|
|
1140
|
+
className="relative flex w-full items-center justify-between gap-4"
|
|
1141
1141
|
>
|
|
1142
|
-
<
|
|
1143
|
-
<span className="
|
|
1142
|
+
<span className="text-as-tertiarry flex flex-wrap items-center gap-1.5 text-sm">
|
|
1143
|
+
<span className="whitespace-nowrap">
|
|
1144
1144
|
Total <span className="text-as-tertiarry">(USD)</span>
|
|
1145
|
-
{anyspendQuote?.data?.fee && (
|
|
1146
|
-
<TooltipProvider>
|
|
1147
|
-
<Tooltip>
|
|
1148
|
-
<TooltipTrigger asChild>
|
|
1149
|
-
<button className="text-as-primary/40 hover:text-as-primary/60 transition-colors">
|
|
1150
|
-
<Info className="h-4 w-4" />
|
|
1151
|
-
</button>
|
|
1152
|
-
</TooltipTrigger>
|
|
1153
|
-
<TooltipContent side="top">
|
|
1154
|
-
<FeeBreakDown fee={anyspendQuote.data.fee} />
|
|
1155
|
-
</TooltipContent>
|
|
1156
|
-
</Tooltip>
|
|
1157
|
-
</TooltipProvider>
|
|
1158
|
-
)}
|
|
1159
1145
|
</span>
|
|
1160
|
-
{
|
|
1161
|
-
|
|
1146
|
+
{anyspendQuote?.data?.fee && (
|
|
1147
|
+
<TooltipProvider>
|
|
1148
|
+
<Tooltip>
|
|
1149
|
+
<TooltipTrigger asChild>
|
|
1150
|
+
<button className="text-as-primary/40 hover:text-as-primary/60 transition-colors">
|
|
1151
|
+
<Info className="h-4 w-4" />
|
|
1152
|
+
</button>
|
|
1153
|
+
</TooltipTrigger>
|
|
1154
|
+
<TooltipContent side="top">
|
|
1155
|
+
<FeeBreakDown fee={anyspendQuote.data.fee} />
|
|
1156
|
+
</TooltipContent>
|
|
1157
|
+
</Tooltip>
|
|
1158
|
+
</TooltipProvider>
|
|
1159
|
+
)}
|
|
1160
|
+
</span>
|
|
1162
1161
|
<div className="flex flex-col items-end gap-0.5">
|
|
1163
|
-
<
|
|
1162
|
+
<div className="flex flex-wrap items-center justify-end gap-2">
|
|
1163
|
+
{renderPointsBadge()}
|
|
1164
|
+
<span className="text-as-primary whitespace-nowrap text-xl font-semibold">
|
|
1165
|
+
${srcFiatAmount || "0.00"}
|
|
1166
|
+
</span>
|
|
1167
|
+
</div>
|
|
1164
1168
|
{anyspendQuote?.data?.fee?.type === "stripeweb2_fee" && anyspendQuote.data.fee.originalAmount && (
|
|
1165
1169
|
<span className="text-as-secondary text-xs">
|
|
1166
1170
|
incl. $
|
|
@@ -10,6 +10,7 @@ import { motion } from "motion/react";
|
|
|
10
10
|
import { useEffect, useMemo, useRef } from "react";
|
|
11
11
|
import { toast } from "sonner";
|
|
12
12
|
import { useSetActiveWallet } from "thirdweb/react";
|
|
13
|
+
import { B3_TOKEN } from "../../constants";
|
|
13
14
|
import { PanelView, useAnyspendFlow } from "../hooks/useAnyspendFlow";
|
|
14
15
|
import { AnySpendFingerprintWrapper, getFingerprintConfig } from "./AnySpendFingerprintWrapper";
|
|
15
16
|
import { CryptoPaySection } from "./common/CryptoPaySection";
|
|
@@ -43,6 +44,7 @@ export interface AnySpendCustomExactInProps {
|
|
|
43
44
|
destinationToken: components["schemas"]["Token"];
|
|
44
45
|
destinationChainId: number;
|
|
45
46
|
onSuccess?: (amount: string) => void;
|
|
47
|
+
onOpenCustomModal?: () => void;
|
|
46
48
|
mainFooter?: React.ReactNode;
|
|
47
49
|
onTokenSelect?: (token: components["schemas"]["Token"], event: { preventDefault: () => void }) => void;
|
|
48
50
|
customUsdInputValues?: string[];
|
|
@@ -79,6 +81,7 @@ function AnySpendCustomExactInInner({
|
|
|
79
81
|
destinationToken,
|
|
80
82
|
destinationChainId,
|
|
81
83
|
onSuccess,
|
|
84
|
+
onOpenCustomModal,
|
|
82
85
|
mainFooter,
|
|
83
86
|
onTokenSelect,
|
|
84
87
|
customUsdInputValues,
|
|
@@ -190,6 +193,9 @@ function AnySpendCustomExactInInner({
|
|
|
190
193
|
|
|
191
194
|
const btnInfo: { text: string; disable: boolean; error: boolean; loading: boolean } = useMemo(() => {
|
|
192
195
|
if (activeInputAmountInWei === "0") return { text: "Enter an amount", disable: true, error: false, loading: false };
|
|
196
|
+
if (orderType === "hype_duel" && selectedSrcToken?.address?.toLowerCase() === B3_TOKEN.address.toLowerCase()) {
|
|
197
|
+
return { text: "Convert to HYPE using B3", disable: false, error: false, loading: false };
|
|
198
|
+
}
|
|
193
199
|
if (isLoadingAnyspendQuote) return { text: "Loading quote...", disable: true, error: false, loading: true };
|
|
194
200
|
if (isCreatingOrder || isCreatingOnrampOrder)
|
|
195
201
|
return { text: "Creating order...", disable: true, error: false, loading: true };
|
|
@@ -259,9 +265,14 @@ function AnySpendCustomExactInInner({
|
|
|
259
265
|
minDestinationAmount,
|
|
260
266
|
DESTINATION_TOKEN_DETAILS.SYMBOL,
|
|
261
267
|
orderType,
|
|
268
|
+
selectedSrcToken,
|
|
262
269
|
]);
|
|
263
270
|
|
|
264
271
|
const onMainButtonClick = async () => {
|
|
272
|
+
if (orderType === "hype_duel" && selectedSrcToken?.address?.toLowerCase() === B3_TOKEN.address.toLowerCase()) {
|
|
273
|
+
onOpenCustomModal?.();
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
265
276
|
if (btnInfo.disable) return;
|
|
266
277
|
|
|
267
278
|
if (!selectedRecipientOrDefault) {
|
|
@@ -16,6 +16,7 @@ export interface AnySpendDepositHypeProps {
|
|
|
16
16
|
sourceTokenAddress?: string;
|
|
17
17
|
sourceTokenChainId?: number;
|
|
18
18
|
onSuccess?: () => void;
|
|
19
|
+
onOpenCustomModal?: () => void;
|
|
19
20
|
mainFooter?: React.ReactNode;
|
|
20
21
|
/**
|
|
21
22
|
* Called when a token is selected. Call event.preventDefault() to prevent default token selection behavior.
|
|
@@ -34,6 +35,7 @@ export function AnySpendDepositHype({
|
|
|
34
35
|
sourceTokenAddress,
|
|
35
36
|
sourceTokenChainId,
|
|
36
37
|
onSuccess,
|
|
38
|
+
onOpenCustomModal,
|
|
37
39
|
mainFooter,
|
|
38
40
|
onTokenSelect,
|
|
39
41
|
customUsdInputValues,
|
|
@@ -75,6 +77,7 @@ export function AnySpendDepositHype({
|
|
|
75
77
|
minDestinationAmount={10}
|
|
76
78
|
header={header}
|
|
77
79
|
onSuccess={onSuccess}
|
|
80
|
+
onOpenCustomModal={onOpenCustomModal}
|
|
78
81
|
mainFooter={mainFooter}
|
|
79
82
|
onTokenSelect={onTokenSelect}
|
|
80
83
|
customUsdInputValues={customUsdInputValues}
|
|
@@ -17,6 +17,7 @@ export interface TokenBalanceResult {
|
|
|
17
17
|
rawBalance: bigint | null;
|
|
18
18
|
formattedBalance: string;
|
|
19
19
|
isLoading: boolean;
|
|
20
|
+
refetch: () => void;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export function useTokenBalanceDirect({ token, address }: UseTokenBalanceProps): TokenBalanceResult {
|
|
@@ -80,5 +81,6 @@ export function useTokenBalanceDirect({ token, address }: UseTokenBalanceProps):
|
|
|
80
81
|
rawBalance: tokenBalance?.raw || BigInt(0),
|
|
81
82
|
formattedBalance: tokenBalance?.formatted || "0",
|
|
82
83
|
isLoading: isActuallyLoading,
|
|
84
|
+
refetch,
|
|
83
85
|
};
|
|
84
86
|
}
|
|
@@ -385,6 +385,8 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
385
385
|
mainFooter?: React.ReactNode;
|
|
386
386
|
/** Callback function called when the deposit is successful */
|
|
387
387
|
onSuccess?: (amount?: string) => void;
|
|
388
|
+
/** Callback function trigger open custom modal */
|
|
389
|
+
onOpenCustomModal?: () => void;
|
|
388
390
|
/** Custom USD input values for quick amount buttons in fiat onramp */
|
|
389
391
|
customUsdInputValues?: string[];
|
|
390
392
|
/** prefer eoa wallet */
|