@b3dotfun/sdk 0.0.32 → 0.0.33-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +26 -25
- package/dist/cjs/anyspend/types/api.d.ts +26 -7
- package/dist/cjs/bondkit/bondkitToken.d.ts +2 -0
- package/dist/cjs/bondkit/bondkitToken.js +32 -1
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +1 -4
- package/dist/cjs/global-account/react/components/ManageAccount/BalanceContent.js +2 -5
- package/dist/cjs/global-account/react/components/index.d.ts +8 -9
- package/dist/cjs/global-account/react/components/index.js +25 -28
- package/dist/cjs/global-account/react/hooks/index.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/index.js +3 -1
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useFirstEOA.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +1 -19
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +4 -3
- package/dist/esm/anyspend/types/api.d.ts +26 -7
- package/dist/esm/bondkit/bondkitToken.d.ts +2 -0
- package/dist/esm/bondkit/bondkitToken.js +32 -1
- package/dist/esm/global-account/react/components/B3DynamicModal.js +1 -4
- package/dist/esm/global-account/react/components/ManageAccount/BalanceContent.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +8 -9
- package/dist/esm/global-account/react/components/index.js +8 -10
- package/dist/esm/global-account/react/hooks/index.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/index.js +1 -0
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useFirstEOA.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +1 -19
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/types/api.d.ts +26 -7
- package/dist/types/bondkit/bondkitToken.d.ts +2 -0
- package/dist/types/global-account/react/components/index.d.ts +8 -9
- package/dist/types/global-account/react/hooks/index.d.ts +1 -0
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +1 -19
- package/package.json +1 -3
- package/src/anyspend/react/components/common/OrderDetails.tsx +6 -3
- package/src/anyspend/types/api.ts +26 -7
- package/src/bondkit/bondkitToken.ts +36 -1
- package/src/global-account/react/components/B3DynamicModal.tsx +0 -4
- package/src/global-account/react/components/ManageAccount/BalanceContent.tsx +1 -1
- package/src/global-account/react/components/index.ts +13 -16
- package/src/global-account/react/hooks/index.ts +1 -0
- package/src/global-account/react/hooks/useFirstEOA.tsx +1 -1
- package/src/global-account/react/stores/index.ts +1 -2
- package/src/global-account/react/stores/useModalStore.ts +0 -20
- package/dist/cjs/global-account/react/components/Transak/TransakModal.d.ts +0 -1
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +0 -110
- package/dist/esm/global-account/react/components/Transak/TransakModal.d.ts +0 -1
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +0 -104
- package/dist/types/global-account/react/components/Transak/TransakModal.d.ts +0 -1
- package/src/global-account/react/components/Transak/TransakModal.tsx +0 -131
|
@@ -12,14 +12,13 @@ const hooks_1 = require("../../../../shared/react/hooks");
|
|
|
12
12
|
const utils_1 = require("../../../../shared/utils");
|
|
13
13
|
const centerTruncate_1 = __importDefault(require("../../../../shared/utils/centerTruncate"));
|
|
14
14
|
const number_1 = require("../../../../shared/utils/number");
|
|
15
|
-
const react_2 = require("@chakra-ui/react");
|
|
16
15
|
const spl_token_1 = require("@solana/spl-token");
|
|
17
16
|
const web3_js_1 = require("@solana/web3.js");
|
|
18
|
-
const
|
|
17
|
+
const react_2 = require("@web3icons/react");
|
|
19
18
|
const lucide_react_1 = require("lucide-react");
|
|
20
|
-
const
|
|
19
|
+
const react_3 = require("motion/react");
|
|
21
20
|
const qrcode_react_1 = require("qrcode.react");
|
|
22
|
-
const
|
|
21
|
+
const react_4 = require("react");
|
|
23
22
|
const react_timeago_1 = __importDefault(require("react-timeago"));
|
|
24
23
|
const sonner_1 = require("sonner");
|
|
25
24
|
const viem_1 = require("viem");
|
|
@@ -130,9 +129,12 @@ function roundTokenAmount(amount) {
|
|
|
130
129
|
const roundedDecimalPart = digits.join("");
|
|
131
130
|
return `${wholePart}.${roundedDecimalPart}`;
|
|
132
131
|
}
|
|
133
|
-
exports.OrderDetails = (0,
|
|
132
|
+
exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ mode = "modal", order, depositTxs, relayTx, executeTx, refundTxs, cryptoPaymentMethod, onBack, disableUrlParamManagement = false, }) {
|
|
134
133
|
const router = (0, hooks_1.useRouter)();
|
|
135
134
|
const searchParams = (0, hooks_1.useSearchParams)();
|
|
135
|
+
// Get theme from B3Provider context
|
|
136
|
+
const { theme } = (0, react_1.useB3)();
|
|
137
|
+
const colorMode = theme || "light";
|
|
136
138
|
// Read crypto payment method from URL parameters
|
|
137
139
|
const cryptoPaymentMethodFromUrl = searchParams.get("cryptoPaymentMethod");
|
|
138
140
|
const effectiveCryptoPaymentMethod = cryptoPaymentMethod || cryptoPaymentMethodFromUrl || CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE;
|
|
@@ -145,12 +147,11 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
145
147
|
const recipientName = profile.data?.name?.replace(/\.b3\.fun/g, "");
|
|
146
148
|
const account = (0, react_1.useAccountWallet)();
|
|
147
149
|
const { data: walletClient } = (0, wagmi_1.useWalletClient)();
|
|
148
|
-
const [txHash, setTxHash] = (0,
|
|
149
|
-
const [showQRCode, setShowQRCode] = (0,
|
|
150
|
+
const [txHash, setTxHash] = (0, react_4.useState)();
|
|
151
|
+
const [showQRCode, setShowQRCode] = (0, react_4.useState)(false);
|
|
150
152
|
const { isLoading: txLoading, isSuccess: txSuccess } = (0, wagmi_1.useWaitForTransactionReceipt)({ hash: txHash });
|
|
151
153
|
const { switchChainAndExecuteWithEOA, isSwitchingOrExecuting } = (0, react_1.useUnifiedChainSwitchAndExecute)();
|
|
152
|
-
const
|
|
153
|
-
const roundedUpSrcAmount = (0, react_5.useMemo)(() => {
|
|
154
|
+
const roundedUpSrcAmount = (0, react_4.useMemo)(() => {
|
|
154
155
|
// Display the full transfer amount without rounding since users need to see the exact value they're transferring.
|
|
155
156
|
// Use 21 significant digits (max allowed by Intl.NumberFormat)
|
|
156
157
|
const formattedSrcAmount = srcToken
|
|
@@ -159,7 +160,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
159
160
|
return roundTokenAmount(formattedSrcAmount);
|
|
160
161
|
}, [order.srcAmount, srcToken]);
|
|
161
162
|
// Unified payment handler for both EOA and AA wallets
|
|
162
|
-
const handleUnifiedPaymentProcess = (0,
|
|
163
|
+
const handleUnifiedPaymentProcess = (0, react_4.useCallback)(async () => {
|
|
163
164
|
let txData;
|
|
164
165
|
let value;
|
|
165
166
|
let to;
|
|
@@ -195,7 +196,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
195
196
|
}
|
|
196
197
|
};
|
|
197
198
|
// When waitingForDeposit is true, we show a message to the user to wait for the deposit to be processed.
|
|
198
|
-
const setWaitingForDeposit = (0,
|
|
199
|
+
const setWaitingForDeposit = (0, react_4.useCallback)(() => {
|
|
199
200
|
if (disableUrlParamManagement)
|
|
200
201
|
return;
|
|
201
202
|
const params = new URLSearchParams(searchParams.toString());
|
|
@@ -203,7 +204,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
203
204
|
router.push(`?${params}`);
|
|
204
205
|
}, [router, searchParams, disableUrlParamManagement]);
|
|
205
206
|
// Clean up URL parameters before closing modal or navigating back
|
|
206
|
-
const cleanupUrlParams = (0,
|
|
207
|
+
const cleanupUrlParams = (0, react_4.useCallback)(() => {
|
|
207
208
|
if (disableUrlParamManagement)
|
|
208
209
|
return;
|
|
209
210
|
const params = new URLSearchParams(searchParams.toString());
|
|
@@ -216,25 +217,25 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
216
217
|
}
|
|
217
218
|
}, [router, searchParams, disableUrlParamManagement]);
|
|
218
219
|
// Helper functions that clean up URL params before executing actions
|
|
219
|
-
const handleCloseModal = (0,
|
|
220
|
+
const handleCloseModal = (0, react_4.useCallback)(() => {
|
|
220
221
|
cleanupUrlParams();
|
|
221
222
|
setB3ModalOpen(false);
|
|
222
223
|
}, [cleanupUrlParams, setB3ModalOpen]);
|
|
223
|
-
const handleBack = (0,
|
|
224
|
+
const handleBack = (0, react_4.useCallback)(() => {
|
|
224
225
|
cleanupUrlParams();
|
|
225
226
|
onBack?.();
|
|
226
227
|
}, [cleanupUrlParams, onBack]);
|
|
227
|
-
(0,
|
|
228
|
+
(0, react_4.useEffect)(() => {
|
|
228
229
|
if (txSuccess) {
|
|
229
230
|
sonner_1.toast.success("Transaction successful! We are processing your order.", { duration: 10000 });
|
|
230
231
|
setWaitingForDeposit();
|
|
231
232
|
setTxHash(undefined);
|
|
232
233
|
}
|
|
233
234
|
}, [setWaitingForDeposit, txSuccess]);
|
|
234
|
-
const isPhantomMobile = (0,
|
|
235
|
-
const isPhantomBrowser = (0,
|
|
235
|
+
const isPhantomMobile = (0, react_4.useMemo)(() => navigator.userAgent.includes("Phantom"), []);
|
|
236
|
+
const isPhantomBrowser = (0, react_4.useMemo)(() => window.phantom?.solana?.isPhantom, []);
|
|
236
237
|
// Get connected Phantom wallet address if available
|
|
237
|
-
const phantomWalletAddress = (0,
|
|
238
|
+
const phantomWalletAddress = (0, react_4.useMemo)(() => {
|
|
238
239
|
const phantom = window.phantom?.solana;
|
|
239
240
|
if (phantom?.isConnected && phantom?.publicKey) {
|
|
240
241
|
return phantom.publicKey.toString();
|
|
@@ -399,7 +400,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
399
400
|
}
|
|
400
401
|
};
|
|
401
402
|
if (refundTxs) {
|
|
402
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "refund-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "Transaction Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(
|
|
403
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "refund-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "Transaction Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(react_3.motion.div, { className: "bg-as-border-primary absolute left-[2px] top-0 z-10 w-[3px]", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1.5, ease: "easeInOut" } }) }), depositTxs
|
|
403
404
|
? depositTxs.map(dTx => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
404
405
|
? `Received payment`
|
|
405
406
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTx.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTx, isProcessing: false }, dTx.txHash)))
|
|
@@ -408,7 +409,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
408
409
|
: null] }) })] }) }), order.errorDetails && ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary/50 text-center text-sm", style: { maxWidth: "40ch" }, children: (0, anyspend_1.getErrorDisplay)(order.errorDetails) }) })), (0, jsx_runtime_1.jsx)("button", { className: "order-close-button bg-as-brand flex w-full items-center justify-center gap-2 rounded-lg p-2 font-semibold text-white", onClick: mode === "page" ? handleBack : handleCloseModal, children: mode === "page" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Return to Home ", (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { className: "ml-2 h-4 w-4" })] })) : ("Close") })] }));
|
|
409
410
|
}
|
|
410
411
|
if (executeTx) {
|
|
411
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "execute-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "Transaction Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(
|
|
412
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "execute-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "Transaction Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(react_3.motion.div, { className: "bg-as-border-primary absolute left-[2px] top-0 z-10 w-[3px]", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1.5, ease: "easeInOut" } }) }), depositTxs
|
|
412
413
|
? depositTxs.map(dTxs => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
413
414
|
? `Received payment`
|
|
414
415
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: false }, dTxs.txHash)))
|
|
@@ -430,7 +431,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
430
431
|
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === "join_tournament" && order.status === "executed" && ((0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-full items-center gap-2", disabled: txLoading || isSwitchingOrExecuting, onClick: handleCloseModal, children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4", children: "Continue to Tournament" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })), order.status === "executed" && ((0, jsx_runtime_1.jsx)("button", { className: "order-close-button bg-as-brand flex w-full items-center justify-center gap-2 rounded-lg p-2 font-semibold text-white", onClick: mode === "page" ? handleBack : handleCloseModal, children: mode === "page" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Return to Home ", (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { className: "ml-2 h-4 w-4" })] })) : ("Close") }))] }));
|
|
431
432
|
}
|
|
432
433
|
if (relayTx && relayTx.status === "success") {
|
|
433
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "more-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "More Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(
|
|
434
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "more-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "More Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(react_3.motion.div, { className: "bg-as-border-primary absolute left-[2px] top-0 z-10 w-[3px]", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1.5, ease: "easeInOut" } }) }), depositTxs
|
|
434
435
|
? depositTxs.map(dTxs => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
435
436
|
? `Received payment`
|
|
436
437
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: false }, dTxs.txHash)))
|
|
@@ -462,7 +463,7 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
462
463
|
// This boolean indicates that user finish payment, and waiting for the deposit to be confirmed. We get this from query params (waitingForDeposit=true)
|
|
463
464
|
const waitingForDeposit = new URLSearchParams(window.location.search).get("waitingForDeposit") === "true";
|
|
464
465
|
if (depositTxs?.length || waitingForDeposit) {
|
|
465
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "deposit-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "Transaction Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(
|
|
466
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount }), (0, jsx_runtime_1.jsx)(Accordion_1.Accordion, { type: "single", collapsible: true, className: "w-full", children: (0, jsx_runtime_1.jsxs)(Accordion_1.AccordionItem, { value: "deposit-details", children: [(0, jsx_runtime_1.jsx)(Accordion_1.AccordionTrigger, { children: "Transaction Details" }), (0, jsx_runtime_1.jsx)(Accordion_1.AccordionContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col gap-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-surface-secondary absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(react_3.motion.div, { className: "from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1, ease: "easeInOut" } }) }), (depositTxs || []).map((dTxs, index) => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
466
467
|
? `Received payment`
|
|
467
468
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: index < (depositTxs || []).length - 1 ? false : !depositEnoughAmount }, dTxs.txHash))), statusDisplay === "failure" ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: statusText, chainId: order.srcChain, tx: null, isProcessing: false, delay: 0.5 })) : depositEnoughAmount ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type === "swap"
|
|
468
469
|
? "Processing Swap"
|
|
@@ -486,11 +487,11 @@ exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal",
|
|
|
486
487
|
? "Pay from Phantom Wallet"
|
|
487
488
|
: "Pay from Connected Wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) }), (0, jsx_runtime_1.jsxs)("span", { className: "label-style text-as-primary/50 text-xs", children: ["Connected to:", " ", order.srcChain === anyspend_1.RELAY_SOLANA_MAINNET_CHAIN_ID && phantomWalletAddress
|
|
488
489
|
? (0, centerTruncate_1.default)(phantomWalletAddress, 6)
|
|
489
|
-
: (0, centerTruncate_1.default)(account?.address || "", 6)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: colorMode === "dark" ? "#ffffff" : "#000000", className: "flex w-5/6 items-center gap-2 sm:px-0", onClick: () => setShowQRCode(true), children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4 text-lg md:text-sm", children: "Pay from a different wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(
|
|
490
|
+
: (0, centerTruncate_1.default)(account?.address || "", 6)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: colorMode === "dark" ? "#ffffff" : "#000000", className: "flex w-5/6 items-center gap-2 sm:px-0", onClick: () => setShowQRCode(true), children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4 text-lg md:text-sm", children: "Pay from a different wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_2.WalletMetamask, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletCoinbase, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletPhantom, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletTrust, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletWalletConnect, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)("span", { className: "label-style text-as-primary/30 text-xs", children: "& more" })] })] })] }) })) : (
|
|
490
491
|
// Default case - existing QR code flow
|
|
491
|
-
(0, jsx_runtime_1.jsx)(
|
|
492
|
+
(0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0, filter: "blur(10px)" }, animate: { opacity: 1, filter: "blur(0px)" }, transition: { duration: 0.5, ease: "easeInOut" }, className: "flex w-full items-center justify-evenly gap-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex flex-col items-center rounded-lg bg-white p-6 pb-3", children: [(0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeSVG, { value: (0, anyspend_1.getPaymentUrl)(order.globalAddress, BigInt(order.srcAmount), order.srcTokenAddress === anyspend_1.RELAY_ETH_ADDRESS ? srcToken?.symbol || "ETH" : order.srcTokenAddress, order.srcChain, srcToken?.decimals), className: "max-w-[200px]" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 flex items-center justify-center gap-2 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "label-style text-as-brand/70 text-sm", children: "Scan with" }), (0, jsx_runtime_1.jsxs)(react_1.TextLoop, { interval: 3, children: [(0, jsx_runtime_1.jsx)(react_2.WalletMetamask, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletCoinbase, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletPhantom, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_2.WalletTrust, { className: "h-5 w-5", variant: "branded" })] })] })] }) }))] })) })), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-center gap-1 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30", children: "Time remaining:" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary", children: depositEnoughAmount ? ("Received") : order.status === "expired" ? ("Expired") : ((0, jsx_runtime_1.jsx)(react_timeago_1.default, { date: new Date(order.expiredAt), live: true })) })] }), statusDisplay !== "processing" && ((0, jsx_runtime_1.jsx)(OrderDetailsCollapsible_1.OrderDetailsCollapsible, { order: order, dstToken: dstToken, tournament: tournament, nft: nft, recipientName: recipientName, formattedExpectedDstAmount: formattedExpectedDstAmount })), (0, jsx_runtime_1.jsxs)("button", { className: "flex w-full items-center justify-center gap-2", onClick: handleBack, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCcw, { className: "ml-2 h-4 w-4" }), " Cancel and start over"] })] }));
|
|
492
493
|
});
|
|
493
494
|
function TransactionDetails({ title, chainId, tx, isProcessing, delay, }) {
|
|
494
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-1 items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex grow items-center gap-4", children: [(0, jsx_runtime_1.jsx)(
|
|
495
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-1 items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex grow items-center gap-4", children: [(0, jsx_runtime_1.jsx)(react_3.motion.div, { className: "bg-as-surface-secondary relative h-10 w-10 rounded-full", children: isProcessing ? ((0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0, scale: 0.3 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, ease: "easeInOut", delay }, className: "border-as-border-secondary absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full border-2 shadow-lg backdrop-blur-sm", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "text-as-primary h-4 w-4 animate-spin" }) })) : ((0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0, scale: 0.3 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, ease: "easeOut", delay }, className: "bg-as-success-secondary absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full border border-white/30 shadow-lg backdrop-blur-sm", children: (0, jsx_runtime_1.jsx)(lucide_react_1.CheckIcon, { className: "text-as-content-icon-success h-4 w-4" }) })) }), (0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, ease: "easeInOut", delay }, className: "shrink-0 text-base", children: isProcessing ? ((0, jsx_runtime_1.jsx)(react_1.TextShimmer, { duration: 1, children: title })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-as-primary", children: title })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-1", children: tx ? ((0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, ease: "easeInOut", delay: (delay || 0) + 0.3 }, className: "flex items-center gap-3", children: (0, jsx_runtime_1.jsx)("a", { href: (0, anyspend_1.getExplorerTxUrl)(chainId, tx.txHash), target: "_blank", children: (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30 font-mono text-xs", children: (0, centerTruncate_1.default)(tx?.txHash, 6) }) }) })) : null })] }));
|
|
495
496
|
}
|
|
496
497
|
exports.OrderDetailsLoadingView = ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "default", className: "hover:bg-b3-react-background flex items-center gap-3 border-white/20 bg-white/10 px-4 py-1 text-base transition-colors", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "text-as-primary h-4 w-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 p-6 pb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[200px] w-[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: "h-5 w-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-background 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)(react_1.Skeleton, { className: "h-10 w-full" })] }));
|
|
@@ -50,7 +50,7 @@ export interface paths {
|
|
|
50
50
|
decimals: number;
|
|
51
51
|
metadata: {
|
|
52
52
|
/** @description Token logo URI */
|
|
53
|
-
logoURI
|
|
53
|
+
logoURI?: string;
|
|
54
54
|
};
|
|
55
55
|
}[];
|
|
56
56
|
/** @example 200 */
|
|
@@ -874,28 +874,47 @@ export interface components {
|
|
|
874
874
|
* @description Country code
|
|
875
875
|
* @example US
|
|
876
876
|
*/
|
|
877
|
-
country
|
|
877
|
+
country: string;
|
|
878
878
|
/**
|
|
879
879
|
* @description Onramp vendor used
|
|
880
880
|
* @example stripe-web2
|
|
881
881
|
* @enum {string}
|
|
882
882
|
*/
|
|
883
|
-
vendor
|
|
883
|
+
vendor: "coinbase" | "stripe" | "stripe-web2";
|
|
884
884
|
/**
|
|
885
885
|
* @description Payment method used
|
|
886
886
|
* @example
|
|
887
887
|
*/
|
|
888
|
-
paymentMethod
|
|
888
|
+
paymentMethod: string;
|
|
889
889
|
/**
|
|
890
890
|
* @description Redirect URL after payment
|
|
891
891
|
* @example https://www.anyspend.com
|
|
892
892
|
*/
|
|
893
|
-
redirectUrl
|
|
893
|
+
redirectUrl: string;
|
|
894
894
|
/**
|
|
895
895
|
* @description Stripe payment amount in cents
|
|
896
896
|
* @example 9900
|
|
897
897
|
*/
|
|
898
898
|
stripeAmountInCents?: number;
|
|
899
|
+
/**
|
|
900
|
+
* Format: ipv4
|
|
901
|
+
* @description Optional IP address for location detection
|
|
902
|
+
* @example 192.168.1.1
|
|
903
|
+
*/
|
|
904
|
+
ipAddress?: string;
|
|
905
|
+
/** @description Optional fingerprint data for fraud detection */
|
|
906
|
+
fingerprint?: {
|
|
907
|
+
/**
|
|
908
|
+
* @description Fingerprint request ID
|
|
909
|
+
* @example fp_req_12345
|
|
910
|
+
*/
|
|
911
|
+
requestId: string;
|
|
912
|
+
/**
|
|
913
|
+
* @description Fingerprint visitor ID
|
|
914
|
+
* @example fp_visitor_67890
|
|
915
|
+
*/
|
|
916
|
+
visitorId: string;
|
|
917
|
+
};
|
|
899
918
|
};
|
|
900
919
|
/** @description Optional onramp configuration */
|
|
901
920
|
Onramp: {
|
|
@@ -1497,10 +1516,10 @@ export interface components {
|
|
|
1497
1516
|
*/
|
|
1498
1517
|
chain: number;
|
|
1499
1518
|
/**
|
|
1500
|
-
* @description Sender address
|
|
1519
|
+
* @description Sender address (can be null)
|
|
1501
1520
|
* @example 0xa7539e73700B1726aBA29526606442A491Ef5747
|
|
1502
1521
|
*/
|
|
1503
|
-
from
|
|
1522
|
+
from?: string | null;
|
|
1504
1523
|
/**
|
|
1505
1524
|
* @description Transaction hash
|
|
1506
1525
|
* @example 0x60ece99a645201668d20db6775a6b3d30967433ff0750b356cdad46d3e13f9c8
|
|
@@ -55,6 +55,8 @@ export declare class BondkitToken {
|
|
|
55
55
|
} | undefined>;
|
|
56
56
|
getTransactionHistory(options?: GetTransactionHistoryOptions): Promise<TransactionResponse | undefined>;
|
|
57
57
|
private executeWrite;
|
|
58
|
+
/** Helper method to wait for transaction confirmation with OKX wallet fallback */
|
|
59
|
+
waitForTransaction(hash: Hex): Promise<import("viem").TransactionReceipt>;
|
|
58
60
|
initialize(config: BondkitTokenInitializationConfig, options?: ExecuteWriteOptions): Promise<Hex | undefined>;
|
|
59
61
|
transfer(to: Address, amount: bigint, options?: ExecuteWriteOptions): Promise<Hex | undefined>;
|
|
60
62
|
approve(spender: Address, amount: bigint, options?: ExecuteWriteOptions): Promise<Hex | undefined>;
|
|
@@ -10,6 +10,9 @@ const config_1 = require("./config");
|
|
|
10
10
|
const boughtEventAbi = abis_1.BondkitTokenABI.find(item => item.type === "event" && item.name === "BondingCurveBuy");
|
|
11
11
|
const soldEventAbi = abis_1.BondkitTokenABI.find(item => item.type === "event" && item.name === "BondingCurveSell");
|
|
12
12
|
const dexMigrationEventAbi = abis_1.BondkitTokenABI.find(item => item.type === "event" && item.name === "BondkitTokenMigrated");
|
|
13
|
+
// OKX wallet polling constants
|
|
14
|
+
const OKX_POLLING_MAX_RETRIES = 60; // 5 minutes with 5 second intervals
|
|
15
|
+
const OKX_POLLING_INTERVAL_MS = 5000; // 5 seconds
|
|
13
16
|
class BondkitToken {
|
|
14
17
|
constructor(contractAddress, walletKey) {
|
|
15
18
|
const sdkConfig = (0, config_1.getConfig)(chains_1.base.id);
|
|
@@ -453,6 +456,34 @@ class BondkitToken {
|
|
|
453
456
|
return this.handleError(error, functionName);
|
|
454
457
|
}
|
|
455
458
|
}
|
|
459
|
+
/** Helper method to wait for transaction confirmation with OKX wallet fallback */
|
|
460
|
+
async waitForTransaction(hash) {
|
|
461
|
+
const isOKX = (typeof window !== "undefined" && window.ethereum?.isOKXWallet) || window.okxwallet;
|
|
462
|
+
if (isOKX) {
|
|
463
|
+
// Fallback to polling for OKX wallet
|
|
464
|
+
let retries = 0;
|
|
465
|
+
while (retries < OKX_POLLING_MAX_RETRIES) {
|
|
466
|
+
try {
|
|
467
|
+
const receipt = await this.publicClient.getTransactionReceipt({ hash });
|
|
468
|
+
if (receipt) {
|
|
469
|
+
return receipt;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
catch (error) {
|
|
473
|
+
if (error.name !== "TransactionReceiptNotFoundError") {
|
|
474
|
+
throw error;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
await new Promise(resolve => setTimeout(resolve, OKX_POLLING_INTERVAL_MS));
|
|
478
|
+
retries++;
|
|
479
|
+
}
|
|
480
|
+
throw new Error("Transaction confirmation timeout");
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
// Use normal waitForTransactionReceipt for other wallets
|
|
484
|
+
return await this.publicClient.waitForTransactionReceipt({ hash });
|
|
485
|
+
}
|
|
486
|
+
}
|
|
456
487
|
async initialize(config, options) {
|
|
457
488
|
return this.executeWrite("initialize", [config], options);
|
|
458
489
|
}
|
|
@@ -503,7 +534,7 @@ class BondkitToken {
|
|
|
503
534
|
if (options?.maxPriorityFeePerGas !== undefined)
|
|
504
535
|
approveOptions.maxPriorityFeePerGas = options.maxPriorityFeePerGas;
|
|
505
536
|
const approveTx = await tradingTokenContract.write.approve([this.contractAddress, amountBigInt], approveOptions);
|
|
506
|
-
await this.
|
|
537
|
+
await this.waitForTransaction(approveTx);
|
|
507
538
|
}
|
|
508
539
|
// Now call the buy function with the trading token amount
|
|
509
540
|
return this.executeWrite("buy", [amountBigInt, minTokensOut], options);
|
|
@@ -12,7 +12,6 @@ const LinkAccount_1 = require("./LinkAccount/LinkAccount");
|
|
|
12
12
|
const ManageAccount_1 = require("./ManageAccount/ManageAccount");
|
|
13
13
|
const RequestPermissions_1 = require("./RequestPermissions/RequestPermissions");
|
|
14
14
|
const SignInWithB3Flow_1 = require("./SignInWithB3/SignInWithB3Flow");
|
|
15
|
-
const TransakModal_1 = require("./Transak/TransakModal");
|
|
16
15
|
const dialog_1 = require("./ui/dialog");
|
|
17
16
|
const drawer_1 = require("./ui/drawer");
|
|
18
17
|
const debug = (0, debug_1.debugB3React)("B3DynamicModal");
|
|
@@ -48,7 +47,7 @@ function B3DynamicModal() {
|
|
|
48
47
|
const hideCloseButton = isFreestyleType;
|
|
49
48
|
// Build content class using cn utility
|
|
50
49
|
// eslint-disable-next-line tailwindcss/no-custom-classname
|
|
51
|
-
const contentClass = (0, cn_1.cn)("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:px-6"
|
|
50
|
+
const contentClass = (0, cn_1.cn)("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:px-6");
|
|
52
51
|
debug("contentType", contentType);
|
|
53
52
|
const renderContent = () => {
|
|
54
53
|
if (!contentType)
|
|
@@ -70,8 +69,6 @@ function B3DynamicModal() {
|
|
|
70
69
|
return (0, jsx_runtime_1.jsx)(react_1.AnySpendTournament, { ...contentType, mode: "modal", action: "join" });
|
|
71
70
|
case "anySpendFundTournament":
|
|
72
71
|
return (0, jsx_runtime_1.jsx)(react_1.AnySpendTournament, { ...contentType, mode: "modal", action: "fund" });
|
|
73
|
-
case "transak":
|
|
74
|
-
return (0, jsx_runtime_1.jsx)(TransakModal_1.TransakModal, {});
|
|
75
72
|
case "anySpendOrderHistory":
|
|
76
73
|
return (0, jsx_runtime_1.jsx)(react_1.OrderHistory, { onBack: () => { }, mode: "modal" });
|
|
77
74
|
case "anySpendStakeB3":
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.BalanceContent = BalanceContent;
|
|
7
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -13,7 +10,7 @@ const utils_1 = require("../../../../shared/utils");
|
|
|
13
10
|
const lucide_react_1 = require("lucide-react");
|
|
14
11
|
const react_2 = require("react");
|
|
15
12
|
const react_3 = require("thirdweb/react");
|
|
16
|
-
const useFirstEOA_1 =
|
|
13
|
+
const useFirstEOA_1 = require("../../hooks/useFirstEOA");
|
|
17
14
|
const TokenIcon_1 = require("../TokenIcon");
|
|
18
15
|
const accordion_1 = require("../ui/accordion");
|
|
19
16
|
const TokenBalanceRow_1 = require("./TokenBalanceRow");
|
|
@@ -24,7 +21,7 @@ function centerTruncate(str, length = 4) {
|
|
|
24
21
|
}
|
|
25
22
|
function BalanceContent({ onLogout, partnerId }) {
|
|
26
23
|
const account = (0, react_3.useActiveAccount)();
|
|
27
|
-
const { address: eoaAddress, info: eoaInfo } = (0, useFirstEOA_1.
|
|
24
|
+
const { address: eoaAddress, info: eoaInfo } = (0, useFirstEOA_1.useFirstEOA)();
|
|
28
25
|
const { data: profile } = (0, react_1.useProfile)({
|
|
29
26
|
address: eoaAddress || account?.address,
|
|
30
27
|
fresh: true,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
|
|
2
1
|
export { B3DynamicModal } from "./B3DynamicModal";
|
|
3
2
|
export { B3Provider, InnerProvider } from "./B3Provider/B3Provider";
|
|
3
|
+
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
|
|
4
4
|
export { B3Context, type B3ContextType } from "./B3Provider/types";
|
|
5
5
|
export { useB3 } from "./B3Provider/useB3";
|
|
6
6
|
export { StyleRoot } from "./StyleRoot";
|
|
7
|
-
export { AuthButton } from "./SignInWithB3/components/AuthButton";
|
|
8
|
-
export { PermissionItem } from "./SignInWithB3/components/PermissionItem";
|
|
9
|
-
export { WalletRow } from "./SignInWithB3/components/WalletRow";
|
|
10
7
|
export { SignInWithB3 } from "./SignInWithB3/SignInWithB3";
|
|
11
8
|
export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow";
|
|
12
9
|
export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy";
|
|
10
|
+
export { AuthButton } from "./SignInWithB3/components/AuthButton";
|
|
11
|
+
export { PermissionItem } from "./SignInWithB3/components/PermissionItem";
|
|
12
|
+
export { WalletRow } from "./SignInWithB3/components/WalletRow";
|
|
13
13
|
export { LoginStepContainer } from "./SignInWithB3/steps/LoginStep";
|
|
14
14
|
export { getConnectOptionsFromStrategy, isWalletType, type AllowedStrategy } from "./SignInWithB3/utils/signInUtils";
|
|
15
15
|
export { ManageAccount } from "./ManageAccount/ManageAccount";
|
|
@@ -19,12 +19,15 @@ export { AccountAssets } from "./AccountAssets/AccountAssets";
|
|
|
19
19
|
export { MintButton } from "./MintButton/MintButton";
|
|
20
20
|
export { SendETHButton } from "./SendETHButton/SendETHButton";
|
|
21
21
|
export { SendERC20Button } from "./SendERC20Button/SendERC20Button";
|
|
22
|
-
export { TransakModal } from "./Transak/TransakModal";
|
|
23
22
|
export { Button as CustomButton, buttonVariants as customButtonVariants } from "./custom/Button";
|
|
24
23
|
export { ClientOnly } from "./custom/ClientOnly";
|
|
25
24
|
export { CopyToClipboard } from "./custom/CopyToClipboard";
|
|
26
25
|
export { StaggeredFadeLoader } from "./custom/StaggeredFadeLoader";
|
|
27
26
|
export { WalletConnectorIcon } from "./custom/WalletConnectorIcon";
|
|
27
|
+
export { Loading } from "./ui/Loading";
|
|
28
|
+
export { ShinyButton } from "./ui/ShinyButton";
|
|
29
|
+
export { TabTrigger, Tabs, TabsContent, TabsList, TabsTransitionWrapper } from "./ui/TabSystem";
|
|
30
|
+
export { TabTrigger as TabTriggerPrimitive, TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, } from "./ui/Tabs";
|
|
28
31
|
export { Badge, badgeVariants } from "./ui/badge";
|
|
29
32
|
export { Button, buttonVariants } from "./ui/button";
|
|
30
33
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "./ui/command";
|
|
@@ -33,13 +36,9 @@ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, Dr
|
|
|
33
36
|
export { GlareCard } from "./ui/glare-card";
|
|
34
37
|
export { GlareCardRounded } from "./ui/glare-card-rounded";
|
|
35
38
|
export { Input } from "./ui/input";
|
|
36
|
-
export { Loading } from "./ui/Loading";
|
|
37
39
|
export { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
|
|
38
40
|
export { ScrollArea, ScrollBar } from "./ui/scroll-area";
|
|
39
|
-
export { ShinyButton } from "./ui/ShinyButton";
|
|
40
41
|
export { Skeleton } from "./ui/skeleton";
|
|
41
|
-
export { TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, TabTrigger as TabTriggerPrimitive, } from "./ui/Tabs";
|
|
42
|
-
export { Tabs, TabsContent, TabsList, TabsTransitionWrapper, TabTrigger } from "./ui/TabSystem";
|
|
43
42
|
export { TextLoop } from "./ui/text-loop";
|
|
44
43
|
export { TextShimmer } from "./ui/text-shimmer";
|
|
45
44
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.AnimatedLottie = exports.TransitionPanel = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.TextShimmer = exports.TextLoop = exports.
|
|
3
|
+
exports.CommandItem = exports.CommandInput = exports.CommandGroup = exports.CommandEmpty = exports.CommandDialog = exports.Command = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.TabsPrimitive = exports.TabsListPrimitive = exports.TabsContentPrimitive = exports.TabTriggerPrimitive = exports.TabsTransitionWrapper = exports.TabsList = exports.TabsContent = exports.Tabs = exports.TabTrigger = exports.ShinyButton = exports.Loading = exports.WalletConnectorIcon = exports.StaggeredFadeLoader = exports.CopyToClipboard = exports.ClientOnly = exports.customButtonVariants = exports.CustomButton = exports.SendERC20Button = exports.SendETHButton = exports.MintButton = exports.AccountAssets = exports.RequestPermissionsButton = exports.RequestPermissions = exports.ManageAccount = exports.isWalletType = exports.getConnectOptionsFromStrategy = exports.LoginStepContainer = exports.WalletRow = exports.PermissionItem = exports.AuthButton = exports.SignInWithB3Privy = exports.SignInWithB3Flow = exports.SignInWithB3 = exports.StyleRoot = exports.useB3 = exports.B3Context = exports.RelayKitProviderWrapper = exports.InnerProvider = exports.B3Provider = exports.B3DynamicModal = void 0;
|
|
4
|
+
exports.AnimatedLottie = exports.TransitionPanel = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.TextShimmer = exports.TextLoop = exports.Skeleton = exports.ScrollBar = exports.ScrollArea = exports.PopoverTrigger = exports.PopoverContent = exports.Popover = exports.Input = exports.GlareCardRounded = exports.GlareCard = exports.DrawerTrigger = exports.DrawerTitle = exports.DrawerPortal = exports.DrawerOverlay = exports.DrawerHeader = exports.DrawerFooter = exports.DrawerDescription = exports.DrawerContent = exports.DrawerClose = exports.Drawer = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.CommandShortcut = exports.CommandSeparator = exports.CommandList = void 0;
|
|
5
5
|
// Core Components
|
|
6
|
-
var RelayKitProviderWrapper_1 = require("./B3Provider/RelayKitProviderWrapper");
|
|
7
|
-
Object.defineProperty(exports, "RelayKitProviderWrapper", { enumerable: true, get: function () { return RelayKitProviderWrapper_1.RelayKitProviderWrapper; } });
|
|
8
6
|
var B3DynamicModal_1 = require("./B3DynamicModal");
|
|
9
7
|
Object.defineProperty(exports, "B3DynamicModal", { enumerable: true, get: function () { return B3DynamicModal_1.B3DynamicModal; } });
|
|
10
8
|
var B3Provider_1 = require("./B3Provider/B3Provider");
|
|
11
9
|
Object.defineProperty(exports, "B3Provider", { enumerable: true, get: function () { return B3Provider_1.B3Provider; } });
|
|
12
10
|
Object.defineProperty(exports, "InnerProvider", { enumerable: true, get: function () { return B3Provider_1.InnerProvider; } });
|
|
11
|
+
var RelayKitProviderWrapper_1 = require("./B3Provider/RelayKitProviderWrapper");
|
|
12
|
+
Object.defineProperty(exports, "RelayKitProviderWrapper", { enumerable: true, get: function () { return RelayKitProviderWrapper_1.RelayKitProviderWrapper; } });
|
|
13
13
|
var types_1 = require("./B3Provider/types");
|
|
14
14
|
Object.defineProperty(exports, "B3Context", { enumerable: true, get: function () { return types_1.B3Context; } });
|
|
15
15
|
var useB3_1 = require("./B3Provider/useB3");
|
|
@@ -17,18 +17,18 @@ Object.defineProperty(exports, "useB3", { enumerable: true, get: function () { r
|
|
|
17
17
|
var StyleRoot_1 = require("./StyleRoot");
|
|
18
18
|
Object.defineProperty(exports, "StyleRoot", { enumerable: true, get: function () { return StyleRoot_1.StyleRoot; } });
|
|
19
19
|
// SignInWithB3 Components
|
|
20
|
-
var AuthButton_1 = require("./SignInWithB3/components/AuthButton");
|
|
21
|
-
Object.defineProperty(exports, "AuthButton", { enumerable: true, get: function () { return AuthButton_1.AuthButton; } });
|
|
22
|
-
var PermissionItem_1 = require("./SignInWithB3/components/PermissionItem");
|
|
23
|
-
Object.defineProperty(exports, "PermissionItem", { enumerable: true, get: function () { return PermissionItem_1.PermissionItem; } });
|
|
24
|
-
var WalletRow_1 = require("./SignInWithB3/components/WalletRow");
|
|
25
|
-
Object.defineProperty(exports, "WalletRow", { enumerable: true, get: function () { return WalletRow_1.WalletRow; } });
|
|
26
20
|
var SignInWithB3_1 = require("./SignInWithB3/SignInWithB3");
|
|
27
21
|
Object.defineProperty(exports, "SignInWithB3", { enumerable: true, get: function () { return SignInWithB3_1.SignInWithB3; } });
|
|
28
22
|
var SignInWithB3Flow_1 = require("./SignInWithB3/SignInWithB3Flow");
|
|
29
23
|
Object.defineProperty(exports, "SignInWithB3Flow", { enumerable: true, get: function () { return SignInWithB3Flow_1.SignInWithB3Flow; } });
|
|
30
24
|
var SignInWithB3Privy_1 = require("./SignInWithB3/SignInWithB3Privy");
|
|
31
25
|
Object.defineProperty(exports, "SignInWithB3Privy", { enumerable: true, get: function () { return SignInWithB3Privy_1.SignInWithB3Privy; } });
|
|
26
|
+
var AuthButton_1 = require("./SignInWithB3/components/AuthButton");
|
|
27
|
+
Object.defineProperty(exports, "AuthButton", { enumerable: true, get: function () { return AuthButton_1.AuthButton; } });
|
|
28
|
+
var PermissionItem_1 = require("./SignInWithB3/components/PermissionItem");
|
|
29
|
+
Object.defineProperty(exports, "PermissionItem", { enumerable: true, get: function () { return PermissionItem_1.PermissionItem; } });
|
|
30
|
+
var WalletRow_1 = require("./SignInWithB3/components/WalletRow");
|
|
31
|
+
Object.defineProperty(exports, "WalletRow", { enumerable: true, get: function () { return WalletRow_1.WalletRow; } });
|
|
32
32
|
var LoginStep_1 = require("./SignInWithB3/steps/LoginStep");
|
|
33
33
|
Object.defineProperty(exports, "LoginStepContainer", { enumerable: true, get: function () { return LoginStep_1.LoginStepContainer; } });
|
|
34
34
|
var signInUtils_1 = require("./SignInWithB3/utils/signInUtils");
|
|
@@ -54,9 +54,6 @@ Object.defineProperty(exports, "SendETHButton", { enumerable: true, get: functio
|
|
|
54
54
|
// SendERC20Button Components
|
|
55
55
|
var SendERC20Button_1 = require("./SendERC20Button/SendERC20Button");
|
|
56
56
|
Object.defineProperty(exports, "SendERC20Button", { enumerable: true, get: function () { return SendERC20Button_1.SendERC20Button; } });
|
|
57
|
-
// Transak Components
|
|
58
|
-
var TransakModal_1 = require("./Transak/TransakModal");
|
|
59
|
-
Object.defineProperty(exports, "TransakModal", { enumerable: true, get: function () { return TransakModal_1.TransakModal; } });
|
|
60
57
|
// Custom Components
|
|
61
58
|
var Button_1 = require("./custom/Button");
|
|
62
59
|
Object.defineProperty(exports, "CustomButton", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
@@ -70,6 +67,21 @@ Object.defineProperty(exports, "StaggeredFadeLoader", { enumerable: true, get: f
|
|
|
70
67
|
var WalletConnectorIcon_1 = require("./custom/WalletConnectorIcon");
|
|
71
68
|
Object.defineProperty(exports, "WalletConnectorIcon", { enumerable: true, get: function () { return WalletConnectorIcon_1.WalletConnectorIcon; } });
|
|
72
69
|
// UI Components
|
|
70
|
+
var Loading_1 = require("./ui/Loading");
|
|
71
|
+
Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return Loading_1.Loading; } });
|
|
72
|
+
var ShinyButton_1 = require("./ui/ShinyButton");
|
|
73
|
+
Object.defineProperty(exports, "ShinyButton", { enumerable: true, get: function () { return ShinyButton_1.ShinyButton; } });
|
|
74
|
+
var TabSystem_1 = require("./ui/TabSystem");
|
|
75
|
+
Object.defineProperty(exports, "TabTrigger", { enumerable: true, get: function () { return TabSystem_1.TabTrigger; } });
|
|
76
|
+
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return TabSystem_1.Tabs; } });
|
|
77
|
+
Object.defineProperty(exports, "TabsContent", { enumerable: true, get: function () { return TabSystem_1.TabsContent; } });
|
|
78
|
+
Object.defineProperty(exports, "TabsList", { enumerable: true, get: function () { return TabSystem_1.TabsList; } });
|
|
79
|
+
Object.defineProperty(exports, "TabsTransitionWrapper", { enumerable: true, get: function () { return TabSystem_1.TabsTransitionWrapper; } });
|
|
80
|
+
var Tabs_1 = require("./ui/Tabs");
|
|
81
|
+
Object.defineProperty(exports, "TabTriggerPrimitive", { enumerable: true, get: function () { return Tabs_1.TabTrigger; } });
|
|
82
|
+
Object.defineProperty(exports, "TabsContentPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsContent; } });
|
|
83
|
+
Object.defineProperty(exports, "TabsListPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsList; } });
|
|
84
|
+
Object.defineProperty(exports, "TabsPrimitive", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
|
|
73
85
|
var badge_1 = require("./ui/badge");
|
|
74
86
|
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return badge_1.Badge; } });
|
|
75
87
|
Object.defineProperty(exports, "badgeVariants", { enumerable: true, get: function () { return badge_1.badgeVariants; } });
|
|
@@ -114,8 +126,6 @@ var glare_card_rounded_1 = require("./ui/glare-card-rounded");
|
|
|
114
126
|
Object.defineProperty(exports, "GlareCardRounded", { enumerable: true, get: function () { return glare_card_rounded_1.GlareCardRounded; } });
|
|
115
127
|
var input_1 = require("./ui/input");
|
|
116
128
|
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
|
|
117
|
-
var Loading_1 = require("./ui/Loading");
|
|
118
|
-
Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return Loading_1.Loading; } });
|
|
119
129
|
var popover_1 = require("./ui/popover");
|
|
120
130
|
Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
|
|
121
131
|
Object.defineProperty(exports, "PopoverContent", { enumerable: true, get: function () { return popover_1.PopoverContent; } });
|
|
@@ -123,21 +133,8 @@ Object.defineProperty(exports, "PopoverTrigger", { enumerable: true, get: functi
|
|
|
123
133
|
var scroll_area_1 = require("./ui/scroll-area");
|
|
124
134
|
Object.defineProperty(exports, "ScrollArea", { enumerable: true, get: function () { return scroll_area_1.ScrollArea; } });
|
|
125
135
|
Object.defineProperty(exports, "ScrollBar", { enumerable: true, get: function () { return scroll_area_1.ScrollBar; } });
|
|
126
|
-
var ShinyButton_1 = require("./ui/ShinyButton");
|
|
127
|
-
Object.defineProperty(exports, "ShinyButton", { enumerable: true, get: function () { return ShinyButton_1.ShinyButton; } });
|
|
128
136
|
var skeleton_1 = require("./ui/skeleton");
|
|
129
137
|
Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return skeleton_1.Skeleton; } });
|
|
130
|
-
var Tabs_1 = require("./ui/Tabs");
|
|
131
|
-
Object.defineProperty(exports, "TabsContentPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsContent; } });
|
|
132
|
-
Object.defineProperty(exports, "TabsListPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsList; } });
|
|
133
|
-
Object.defineProperty(exports, "TabsPrimitive", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
|
|
134
|
-
Object.defineProperty(exports, "TabTriggerPrimitive", { enumerable: true, get: function () { return Tabs_1.TabTrigger; } });
|
|
135
|
-
var TabSystem_1 = require("./ui/TabSystem");
|
|
136
|
-
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return TabSystem_1.Tabs; } });
|
|
137
|
-
Object.defineProperty(exports, "TabsContent", { enumerable: true, get: function () { return TabSystem_1.TabsContent; } });
|
|
138
|
-
Object.defineProperty(exports, "TabsList", { enumerable: true, get: function () { return TabSystem_1.TabsList; } });
|
|
139
|
-
Object.defineProperty(exports, "TabsTransitionWrapper", { enumerable: true, get: function () { return TabSystem_1.TabsTransitionWrapper; } });
|
|
140
|
-
Object.defineProperty(exports, "TabTrigger", { enumerable: true, get: function () { return TabSystem_1.TabTrigger; } });
|
|
141
138
|
var text_loop_1 = require("./ui/text-loop");
|
|
142
139
|
Object.defineProperty(exports, "TextLoop", { enumerable: true, get: function () { return text_loop_1.TextLoop; } });
|
|
143
140
|
var text_shimmer_1 = require("./ui/text-shimmer");
|
|
@@ -10,6 +10,7 @@ export { useChainSwitchWithAction } from "./useChainSwitchWithAction";
|
|
|
10
10
|
export * from "./useClaim";
|
|
11
11
|
export { useConnect } from "./useConnect";
|
|
12
12
|
export { useExchangeRate } from "./useExchangeRate";
|
|
13
|
+
export { useFirstEOA } from "./useFirstEOA";
|
|
13
14
|
export { useGetAllTWSigners, type TWSignerWithMetadata } from "./useGetAllTWSigners";
|
|
14
15
|
export { useGetGeo } from "./useGetGeo";
|
|
15
16
|
export { useHandleConnectWithPrivy } from "./useHandleConnectWithPrivy";
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.useURLParams = exports.useUnifiedChainSwitchAndExecute = exports.useTokensFromAddress = exports.useTokenPriceWithFallback = exports.useTokenPrice = exports.useTokenFromUrl = exports.useTokenData = exports.useTokenBalancesByChain = exports.useTokenBalance = exports.useSiwe = exports.useSimBalance = exports.useSearchParamsSSR = exports.useRouter = exports.useRemoveSessionKey = exports.useQueryBSMNT = exports.useQueryB3 = exports.useProfilePreference = exports.useProfile = exports.useOneBalance = exports.useNativeBalanceFromRPC = exports.useNativeBalance = exports.useMediaQuery = exports.useIsomorphicLayoutEffect = exports.useIsMobile = exports.useHasMounted = exports.useHandleConnectWithPrivy = exports.useGetGeo = exports.useGetAllTWSigners = exports.useExchangeRate = exports.useConnect = exports.useChainSwitchWithAction = exports.useBestTransactionPath = exports.useB3EnsName = exports.useB3BalanceFromAddresses = exports.useAuthentication = exports.useAnalytics = exports.useAddTWSessionKey = exports.useAccountWallet = exports.useAccountAssets = void 0;
|
|
17
|
+
exports.useURLParams = exports.useUnifiedChainSwitchAndExecute = exports.useTokensFromAddress = exports.useTokenPriceWithFallback = exports.useTokenPrice = exports.useTokenFromUrl = exports.useTokenData = exports.useTokenBalancesByChain = exports.useTokenBalance = exports.useSiwe = exports.useSimBalance = exports.useSearchParamsSSR = exports.useRouter = exports.useRemoveSessionKey = exports.useQueryBSMNT = exports.useQueryB3 = exports.useProfilePreference = exports.useProfile = exports.useOneBalance = exports.useNativeBalanceFromRPC = exports.useNativeBalance = exports.useMediaQuery = exports.useIsomorphicLayoutEffect = exports.useIsMobile = exports.useHasMounted = exports.useHandleConnectWithPrivy = exports.useGetGeo = exports.useGetAllTWSigners = exports.useFirstEOA = exports.useExchangeRate = exports.useConnect = exports.useChainSwitchWithAction = exports.useBestTransactionPath = exports.useB3EnsName = exports.useB3BalanceFromAddresses = exports.useAuthentication = exports.useAnalytics = exports.useAddTWSessionKey = exports.useAccountWallet = exports.useAccountAssets = void 0;
|
|
18
18
|
var useAccountAssets_1 = require("./useAccountAssets");
|
|
19
19
|
Object.defineProperty(exports, "useAccountAssets", { enumerable: true, get: function () { return useAccountAssets_1.useAccountAssets; } });
|
|
20
20
|
var useAccountWallet_1 = require("./useAccountWallet");
|
|
@@ -38,6 +38,8 @@ var useConnect_1 = require("./useConnect");
|
|
|
38
38
|
Object.defineProperty(exports, "useConnect", { enumerable: true, get: function () { return useConnect_1.useConnect; } });
|
|
39
39
|
var useExchangeRate_1 = require("./useExchangeRate");
|
|
40
40
|
Object.defineProperty(exports, "useExchangeRate", { enumerable: true, get: function () { return useExchangeRate_1.useExchangeRate; } });
|
|
41
|
+
var useFirstEOA_1 = require("./useFirstEOA");
|
|
42
|
+
Object.defineProperty(exports, "useFirstEOA", { enumerable: true, get: function () { return useFirstEOA_1.useFirstEOA; } });
|
|
41
43
|
var useGetAllTWSigners_1 = require("./useGetAllTWSigners");
|
|
42
44
|
Object.defineProperty(exports, "useGetAllTWSigners", { enumerable: true, get: function () { return useGetAllTWSigners_1.useGetAllTWSigners; } });
|
|
43
45
|
var useGetGeo_1 = require("./useGetGeo");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Wallet } from "thirdweb/wallets";
|
|
2
|
-
export
|
|
2
|
+
export declare function useFirstEOA(): {
|
|
3
3
|
account: Wallet | undefined;
|
|
4
4
|
address: string | undefined;
|
|
5
5
|
info: import("@tanstack/react-query").UseQueryResult<import("thirdweb/wallets").WalletInfo, Error>;
|