coinley-test 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +220 -72
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -250,48 +250,55 @@ const WalletIntegration = ({
|
|
|
250
250
|
selectedToken,
|
|
251
251
|
paymentData,
|
|
252
252
|
config,
|
|
253
|
-
// Add config as prop
|
|
254
253
|
onTransactionSent,
|
|
255
254
|
onError,
|
|
256
255
|
isConnecting,
|
|
257
256
|
setIsConnecting
|
|
258
257
|
}) => {
|
|
259
|
-
const { isConnected, address } = useWallet();
|
|
258
|
+
const { isConnected, address, disconnect } = useWallet();
|
|
260
259
|
const { connectWallet, isPending } = useWalletConnect();
|
|
261
260
|
const { detectedWallets, hasWallets, walletCount } = useWalletDetection();
|
|
262
261
|
const { sendTransaction } = useWalletTransaction();
|
|
263
262
|
useWalletModal();
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
263
|
+
const ethereumWallets = detectedWallets.filter(
|
|
264
|
+
(wallet) => wallet.name.toLowerCase().includes("metamask") || wallet.provider === "injected" || wallet.name.toLowerCase().includes("coinbase") || wallet.name.toLowerCase().includes("wallet connect")
|
|
265
|
+
);
|
|
266
|
+
const handleConnectSpecificWallet = async (walletType) => {
|
|
267
|
+
try {
|
|
268
|
+
setIsConnecting(true);
|
|
269
|
+
if (isConnected) {
|
|
270
|
+
await disconnect();
|
|
271
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
272
|
+
}
|
|
273
|
+
await connectWallet(walletType);
|
|
274
|
+
} catch (error) {
|
|
275
|
+
console.error("Wallet connection failed:", error);
|
|
276
|
+
onError(error.message || "Failed to connect wallet");
|
|
277
|
+
} finally {
|
|
278
|
+
setIsConnecting(false);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
const handleSendPayment = async () => {
|
|
282
|
+
var _a;
|
|
283
|
+
if (!isConnected || !paymentData || !selectedToken) {
|
|
284
|
+
onError("Wallet not connected or payment data missing");
|
|
285
|
+
return;
|
|
271
286
|
}
|
|
272
|
-
}, [isConnected, address, paymentData]);
|
|
273
|
-
const handleSendTransaction = async () => {
|
|
274
|
-
var _a, _b;
|
|
275
|
-
if (!isConnected || !paymentData || !selectedToken) return;
|
|
276
287
|
try {
|
|
277
288
|
setIsConnecting(true);
|
|
278
289
|
console.log("🔍 Transaction Debug:");
|
|
290
|
+
console.log("Connected wallet address:", address);
|
|
279
291
|
console.log("Payment data:", paymentData);
|
|
280
292
|
console.log("Selected token:", selectedToken);
|
|
281
293
|
console.log("Selected network:", selectedNetwork);
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
console.log("Raw recipient address:", recipientAddress);
|
|
285
|
-
if (typeof recipientAddress === "object" && recipientAddress.address) {
|
|
286
|
-
recipientAddress = recipientAddress.address;
|
|
287
|
-
}
|
|
294
|
+
let recipientAddress = (_a = paymentData.metadata) == null ? void 0 : _a.recipientWallet;
|
|
295
|
+
console.log("Merchant recipient address:", recipientAddress);
|
|
288
296
|
if (!recipientAddress || typeof recipientAddress !== "string") {
|
|
289
|
-
throw new Error("
|
|
297
|
+
throw new Error("Merchant wallet address not found in payment data");
|
|
290
298
|
}
|
|
291
299
|
if (!recipientAddress.match(/^0x[a-fA-F0-9]{40}$/)) {
|
|
292
|
-
throw new Error(`Invalid
|
|
300
|
+
throw new Error(`Invalid merchant address format: ${recipientAddress}`);
|
|
293
301
|
}
|
|
294
|
-
console.log("✅ Using recipient address:", recipientAddress);
|
|
295
302
|
let txHash;
|
|
296
303
|
if (selectedToken.contractAddress) {
|
|
297
304
|
console.log("🔍 ERC-20 Transaction Details:");
|
|
@@ -301,12 +308,12 @@ const WalletIntegration = ({
|
|
|
301
308
|
const decimals = selectedToken.decimals || 6;
|
|
302
309
|
const amount = Math.floor(paymentData.totalAmount * Math.pow(10, decimals));
|
|
303
310
|
console.log("Calculated amount (with decimals):", amount);
|
|
304
|
-
console.log("Amount in hex:", amount.toString(16));
|
|
305
311
|
const methodId = "0xa9059cbb";
|
|
306
|
-
const
|
|
312
|
+
const addressWithoutPrefix = recipientAddress.slice(2);
|
|
313
|
+
const recipientPadded = addressWithoutPrefix.toLowerCase().padStart(64, "0");
|
|
307
314
|
const amountPadded = amount.toString(16).padStart(64, "0");
|
|
308
315
|
const transferData = `${methodId}${recipientPadded}${amountPadded}`;
|
|
309
|
-
console.log("🔍 Transaction Data
|
|
316
|
+
console.log("🔍 Transaction Data:");
|
|
310
317
|
console.log("Method ID:", methodId);
|
|
311
318
|
console.log("Recipient (padded):", recipientPadded);
|
|
312
319
|
console.log("Amount (padded):", amountPadded);
|
|
@@ -319,11 +326,8 @@ const WalletIntegration = ({
|
|
|
319
326
|
console.log("📤 Sending ERC-20 transaction:", txParams);
|
|
320
327
|
txHash = await sendTransaction(txParams);
|
|
321
328
|
} else {
|
|
322
|
-
console.log("🔍 Native Token Transaction:");
|
|
323
329
|
const value = Math.floor(paymentData.totalAmount * Math.pow(10, 18));
|
|
324
330
|
const valueHex = `0x${value.toString(16)}`;
|
|
325
|
-
console.log("Native amount:", value);
|
|
326
|
-
console.log("Native amount hex:", valueHex);
|
|
327
331
|
const txParams = {
|
|
328
332
|
to: recipientAddress,
|
|
329
333
|
value: valueHex
|
|
@@ -337,58 +341,132 @@ const WalletIntegration = ({
|
|
|
337
341
|
}
|
|
338
342
|
} catch (error) {
|
|
339
343
|
console.error("❌ Transaction failed:", error);
|
|
340
|
-
console.error("Error details:", {
|
|
341
|
-
message: error.message,
|
|
342
|
-
cause: error.cause,
|
|
343
|
-
details: error.details
|
|
344
|
-
});
|
|
345
344
|
onError(error.message || "Transaction failed");
|
|
346
345
|
} finally {
|
|
347
346
|
setIsConnecting(false);
|
|
348
347
|
}
|
|
349
348
|
};
|
|
349
|
+
const handleDisconnect = async () => {
|
|
350
|
+
try {
|
|
351
|
+
await disconnect();
|
|
352
|
+
} catch (error) {
|
|
353
|
+
console.error("Disconnect error:", error);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
350
356
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center space-y-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
351
357
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-16 h-16 bg-[#7042D2] bg-opacity-20 rounded-full flex items-center justify-center mx-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wallet, { className: "w-8 h-8 text-[#7042D2]" }) }),
|
|
352
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
353
|
-
|
|
354
|
-
"
|
|
355
|
-
{
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
358
|
+
!isConnected ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
359
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-semibold", children: "Connect Your Wallet" }),
|
|
360
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: "Choose your preferred wallet to complete the payment" }),
|
|
361
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
|
|
362
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
363
|
+
"button",
|
|
364
|
+
{
|
|
365
|
+
onClick: () => handleConnectSpecificWallet("injected"),
|
|
366
|
+
disabled: isPending || isConnecting,
|
|
367
|
+
className: "w-full p-3 border border-gray-300 rounded-lg hover:border-[#7042D2] flex items-center space-x-3 transition-colors disabled:opacity-50",
|
|
368
|
+
children: [
|
|
369
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xl", children: "🦊" }),
|
|
370
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-left flex-1", children: [
|
|
371
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "MetaMask" }),
|
|
372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500", children: "Connect with MetaMask" })
|
|
373
|
+
] })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
),
|
|
377
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
378
|
+
"button",
|
|
379
|
+
{
|
|
380
|
+
onClick: () => handleConnectSpecificWallet("walletConnect"),
|
|
381
|
+
disabled: isPending || isConnecting,
|
|
382
|
+
className: "w-full p-3 border border-gray-300 rounded-lg hover:border-[#7042D2] flex items-center space-x-3 transition-colors disabled:opacity-50",
|
|
383
|
+
children: [
|
|
384
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xl", children: "🔗" }),
|
|
385
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-left flex-1", children: [
|
|
386
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "WalletConnect" }),
|
|
387
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500", children: "Scan with mobile wallet" })
|
|
388
|
+
] })
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
),
|
|
392
|
+
ethereumWallets.filter(
|
|
393
|
+
(wallet) => !wallet.name.toLowerCase().includes("metamask")
|
|
394
|
+
).map((wallet, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
395
|
+
"button",
|
|
396
|
+
{
|
|
397
|
+
onClick: () => handleConnectSpecificWallet("injected"),
|
|
398
|
+
disabled: isPending || isConnecting,
|
|
399
|
+
className: "w-full p-3 border border-gray-300 rounded-lg hover:border-[#7042D2] flex items-center space-x-3 transition-colors disabled:opacity-50",
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xl", children: wallet.icon }),
|
|
402
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-left flex-1", children: [
|
|
403
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: wallet.name }),
|
|
404
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500", children: wallet.provider })
|
|
405
|
+
] })
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
index
|
|
409
|
+
))
|
|
374
410
|
] }),
|
|
375
|
-
|
|
411
|
+
isConnecting && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center space-x-2 text-gray-600", children: [
|
|
412
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader2, { className: "w-4 h-4 animate-spin" }),
|
|
413
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Connecting..." })
|
|
414
|
+
] })
|
|
415
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
416
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-semibold text-green-600", children: "Wallet Connected ✅" }),
|
|
417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 dark:bg-gray-800 rounded-lg p-4 space-y-3", children: [
|
|
376
418
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
377
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "
|
|
378
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
419
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Address:" }),
|
|
420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
421
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-sm", children: [
|
|
422
|
+
address == null ? void 0 : address.slice(0, 6),
|
|
423
|
+
"...",
|
|
424
|
+
address == null ? void 0 : address.slice(-4)
|
|
425
|
+
] }),
|
|
426
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
427
|
+
"button",
|
|
428
|
+
{
|
|
429
|
+
onClick: handleDisconnect,
|
|
430
|
+
className: "text-xs text-red-600 hover:text-red-800",
|
|
431
|
+
children: "Disconnect"
|
|
432
|
+
}
|
|
433
|
+
)
|
|
382
434
|
] })
|
|
383
435
|
] }),
|
|
384
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
385
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
386
|
-
|
|
436
|
+
paymentData && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
437
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
438
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Amount:" }),
|
|
439
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium", children: [
|
|
440
|
+
paymentData.totalAmount,
|
|
441
|
+
" ",
|
|
442
|
+
selectedToken == null ? void 0 : selectedToken.symbol
|
|
443
|
+
] })
|
|
444
|
+
] }),
|
|
445
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
446
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Network:" }),
|
|
447
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedNetwork == null ? void 0 : selectedNetwork.name })
|
|
448
|
+
] })
|
|
387
449
|
] })
|
|
388
450
|
] }),
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
451
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
452
|
+
"button",
|
|
453
|
+
{
|
|
454
|
+
onClick: handleSendPayment,
|
|
455
|
+
disabled: isConnecting,
|
|
456
|
+
className: "w-full bg-[#7042D2] text-white py-4 rounded-lg font-semibold hover:bg-[#7042D2]/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center space-x-2",
|
|
457
|
+
children: isConnecting ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
458
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader2, { className: "w-5 h-5 animate-spin" }),
|
|
459
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Processing Payment..." })
|
|
460
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
461
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { className: "w-5 h-5" }),
|
|
462
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Send Payment" })
|
|
463
|
+
] })
|
|
464
|
+
}
|
|
465
|
+
),
|
|
466
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", children: [
|
|
467
|
+
"Make sure you have enough ",
|
|
468
|
+
selectedToken == null ? void 0 : selectedToken.symbol,
|
|
469
|
+
" and ETH for gas fees"
|
|
392
470
|
] })
|
|
393
471
|
] })
|
|
394
472
|
] }) });
|
|
@@ -491,12 +569,21 @@ const CoinleyPayment = ({
|
|
|
491
569
|
return ((_a = token.Network) == null ? void 0 : _a.shortName) === network.shortName || token.networkId === network.id;
|
|
492
570
|
}
|
|
493
571
|
);
|
|
494
|
-
if (networkTokens.length >
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
572
|
+
if (networkTokens.length > 1) {
|
|
573
|
+
setCurrentStep("select-token");
|
|
574
|
+
} else if (networkTokens.length === 1) {
|
|
575
|
+
const token = networkTokens[0];
|
|
576
|
+
setSelectedToken(token);
|
|
577
|
+
await initiatePayment(network, token);
|
|
578
|
+
} else {
|
|
579
|
+
setError(`No supported tokens found for ${network.name}`);
|
|
580
|
+
setCurrentStep("error");
|
|
498
581
|
}
|
|
499
582
|
};
|
|
583
|
+
const handleTokenSelect = async (token) => {
|
|
584
|
+
setSelectedToken(token);
|
|
585
|
+
await initiatePayment(selectedNetwork, token);
|
|
586
|
+
};
|
|
500
587
|
const initiatePayment = async (network, token) => {
|
|
501
588
|
try {
|
|
502
589
|
setLoading(true);
|
|
@@ -638,8 +725,20 @@ const CoinleyPayment = ({
|
|
|
638
725
|
const goBack = () => {
|
|
639
726
|
if (currentStep === "select-network") {
|
|
640
727
|
setCurrentStep("select-method");
|
|
641
|
-
} else if (currentStep === "
|
|
728
|
+
} else if (currentStep === "select-token") {
|
|
642
729
|
setCurrentStep("select-network");
|
|
730
|
+
} else if (currentStep === "wallet-connect" || currentStep === "qr-code") {
|
|
731
|
+
const networkTokens = tokens.filter(
|
|
732
|
+
(token) => {
|
|
733
|
+
var _a;
|
|
734
|
+
return ((_a = token.Network) == null ? void 0 : _a.shortName) === (selectedNetwork == null ? void 0 : selectedNetwork.shortName) || token.networkId === (selectedNetwork == null ? void 0 : selectedNetwork.id);
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
if (networkTokens.length > 1) {
|
|
738
|
+
setCurrentStep("select-token");
|
|
739
|
+
} else {
|
|
740
|
+
setCurrentStep("select-network");
|
|
741
|
+
}
|
|
643
742
|
}
|
|
644
743
|
};
|
|
645
744
|
if (!isOpen) return null;
|
|
@@ -767,6 +866,55 @@ const CoinleyPayment = ({
|
|
|
767
866
|
},
|
|
768
867
|
"select-network"
|
|
769
868
|
),
|
|
869
|
+
currentStep === "select-token" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
870
|
+
motion.div,
|
|
871
|
+
{
|
|
872
|
+
initial: { x: 20, opacity: 0 },
|
|
873
|
+
animate: { x: 0, opacity: 1 },
|
|
874
|
+
exit: { x: -20, opacity: 0 },
|
|
875
|
+
className: "space-y-4",
|
|
876
|
+
children: [
|
|
877
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-lg font-semibold text-center mb-6", children: [
|
|
878
|
+
"Select Token on ",
|
|
879
|
+
selectedNetwork == null ? void 0 : selectedNetwork.name
|
|
880
|
+
] }),
|
|
881
|
+
loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader2, { className: "w-8 h-8 animate-spin text-[#7042D2]" }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-3", children: tokens.filter(
|
|
882
|
+
(token) => {
|
|
883
|
+
var _a;
|
|
884
|
+
return ((_a = token.Network) == null ? void 0 : _a.shortName) === (selectedNetwork == null ? void 0 : selectedNetwork.shortName) || token.networkId === (selectedNetwork == null ? void 0 : selectedNetwork.id);
|
|
885
|
+
}
|
|
886
|
+
).map((token) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
887
|
+
motion.button,
|
|
888
|
+
{
|
|
889
|
+
whileHover: { scale: 1.02 },
|
|
890
|
+
whileTap: { scale: 0.98 },
|
|
891
|
+
onClick: () => handleTokenSelect(token),
|
|
892
|
+
className: "w-full p-4 border-2 border-gray-200 dark:border-gray-700 rounded-xl hover:border-[#7042D2] transition-colors group",
|
|
893
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
894
|
+
token.logo ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
895
|
+
"img",
|
|
896
|
+
{
|
|
897
|
+
src: token.logo,
|
|
898
|
+
alt: token.symbol,
|
|
899
|
+
className: "w-8 h-8 rounded-full"
|
|
900
|
+
}
|
|
901
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-8 h-8 bg-[#7042D2] bg-opacity-20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-bold text-[#7042D2]", children: token.symbol.charAt(0) }) }),
|
|
902
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-left flex-1", children: [
|
|
903
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-semibold", children: token.name }),
|
|
904
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
|
|
905
|
+
token.symbol,
|
|
906
|
+
token.isStablecoin && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-0.5 bg-green-100 text-green-600 text-xs rounded-full", children: "Stablecoin" })
|
|
907
|
+
] })
|
|
908
|
+
] }),
|
|
909
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-5 h-5 text-gray-400 transform -rotate-90" })
|
|
910
|
+
] })
|
|
911
|
+
},
|
|
912
|
+
token.id
|
|
913
|
+
)) })
|
|
914
|
+
]
|
|
915
|
+
},
|
|
916
|
+
"select-token"
|
|
917
|
+
),
|
|
770
918
|
currentStep === "wallet-connect" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
771
919
|
motion.div,
|
|
772
920
|
{
|