@retinalabsllc/zairusjs 16.0.40 → 16.0.50
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.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +30 -60
- package/dist/index.mjs +30 -60
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -932,6 +932,8 @@ interface NetworkOption {
|
|
|
932
932
|
symbol: string;
|
|
933
933
|
logoUrl?: string;
|
|
934
934
|
addressRegex?: string;
|
|
935
|
+
decimals?: number;
|
|
936
|
+
minimumWithdrawal?: number;
|
|
935
937
|
}
|
|
936
938
|
interface FiatCurrencyOption {
|
|
937
939
|
code: string;
|
|
@@ -959,6 +961,7 @@ interface UniversalBuyCryptoPageProps {
|
|
|
959
961
|
fiatAmount: string;
|
|
960
962
|
cryptoAmount: string;
|
|
961
963
|
ratePerToken?: string;
|
|
964
|
+
rateKey?: string;
|
|
962
965
|
}>;
|
|
963
966
|
onSubmitCheckout?: (payload: {
|
|
964
967
|
fiatAmount: string;
|
|
@@ -967,6 +970,7 @@ interface UniversalBuyCryptoPageProps {
|
|
|
967
970
|
selectedNetwork: NetworkOption;
|
|
968
971
|
recipientAddress: string;
|
|
969
972
|
fiatCurrency: FiatCurrencyOption;
|
|
973
|
+
rateKey?: string;
|
|
970
974
|
}) => Promise<void>;
|
|
971
975
|
onBack?: () => void;
|
|
972
976
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -932,6 +932,8 @@ interface NetworkOption {
|
|
|
932
932
|
symbol: string;
|
|
933
933
|
logoUrl?: string;
|
|
934
934
|
addressRegex?: string;
|
|
935
|
+
decimals?: number;
|
|
936
|
+
minimumWithdrawal?: number;
|
|
935
937
|
}
|
|
936
938
|
interface FiatCurrencyOption {
|
|
937
939
|
code: string;
|
|
@@ -959,6 +961,7 @@ interface UniversalBuyCryptoPageProps {
|
|
|
959
961
|
fiatAmount: string;
|
|
960
962
|
cryptoAmount: string;
|
|
961
963
|
ratePerToken?: string;
|
|
964
|
+
rateKey?: string;
|
|
962
965
|
}>;
|
|
963
966
|
onSubmitCheckout?: (payload: {
|
|
964
967
|
fiatAmount: string;
|
|
@@ -967,6 +970,7 @@ interface UniversalBuyCryptoPageProps {
|
|
|
967
970
|
selectedNetwork: NetworkOption;
|
|
968
971
|
recipientAddress: string;
|
|
969
972
|
fiatCurrency: FiatCurrencyOption;
|
|
973
|
+
rateKey?: string;
|
|
970
974
|
}) => Promise<void>;
|
|
971
975
|
onBack?: () => void;
|
|
972
976
|
}
|
package/dist/index.js
CHANGED
|
@@ -2911,12 +2911,12 @@ var UniversalSecurityPage = ({
|
|
|
2911
2911
|
className: "w-full"
|
|
2912
2912
|
},
|
|
2913
2913
|
hasPasscode ? "Update Passcode" : "Set Passcode"
|
|
2914
|
-
)))))), showPasskeyModal && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ import_react41.default.createElement("
|
|
2914
|
+
)))))), showPasskeyModal && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[13px] text-neutral-500 mb-8 leading-relaxed" }, "Use your device's biometrics (Face ID, Touch ID, or PIN) to securely sign into your account without needing a password."), /* @__PURE__ */ import_react41.default.createElement(
|
|
2915
2915
|
ThreeDActionButton,
|
|
2916
2916
|
{
|
|
2917
2917
|
onClick: submitEnablePasskey,
|
|
2918
2918
|
isLoading: isSubmitting,
|
|
2919
|
-
className: "w-full
|
|
2919
|
+
className: "w-full"
|
|
2920
2920
|
},
|
|
2921
2921
|
"Create Passkey"
|
|
2922
2922
|
)))));
|
|
@@ -4019,7 +4019,7 @@ var UniversalReferralPage = ({
|
|
|
4019
4019
|
const finalSrc = src || fallbackUrl;
|
|
4020
4020
|
return /* @__PURE__ */ import_react69.default.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ import_react69.default.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
4021
4021
|
};
|
|
4022
|
-
return /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react69.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react69.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react69.default.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 mb-6 px-1" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "bg-[#143731] rounded-3xl p-
|
|
4022
|
+
return /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react69.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react69.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react69.default.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 mb-6 px-1" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "bg-[#143731] rounded-3xl p-6 relative overflow-hidden flex flex-col min-h-25 w-full mt-2" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "relative z-10 flex flex-col items-start" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-[11px] text-white leading-tight mb-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-white/60" }, "AFT Balance")), isLoading ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "h-8 w-32 bg-white/10 animate-pulse rounded mt-2" }) : /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-lg text-white tracking-tight mt-1" }, referralCoins)))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-6 p-4 rounded-3xl bg-white w-full" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "border border-neutral-200 rounded-xl p-4 flex items-center justify-between" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "h-6 w-24 bg-neutral-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-sm text-black tracking-widest" }, referralCode)), /* @__PURE__ */ import_react69.default.createElement(
|
|
4023
4023
|
"button",
|
|
4024
4024
|
{
|
|
4025
4025
|
onClick: handleCopyCode,
|
|
@@ -4375,27 +4375,23 @@ var UniversalBuyCryptoPage = ({
|
|
|
4375
4375
|
const found = cryptoOptions.find((c) => c.code === defaultCryptoCode);
|
|
4376
4376
|
if (found) return found;
|
|
4377
4377
|
}
|
|
4378
|
-
return cryptoOptions[0]
|
|
4379
|
-
code: "USDC",
|
|
4380
|
-
name: "USD Coin",
|
|
4381
|
-
logoUrl: "https://cryptologos.cc/logos/usd-coin-usdc-logo.png",
|
|
4382
|
-
networks: [{ id: "POLYGON", name: "Polygon (MATIC)", symbol: "POLYGON" }]
|
|
4383
|
-
};
|
|
4378
|
+
return cryptoOptions[0];
|
|
4384
4379
|
});
|
|
4385
4380
|
const [selectedNetwork, setSelectedNetwork] = (0, import_react75.useState)(() => {
|
|
4386
4381
|
if (defaultNetworkId && selectedCrypto?.networks) {
|
|
4387
4382
|
const foundNet = selectedCrypto.networks.find((n) => n.id === defaultNetworkId);
|
|
4388
4383
|
if (foundNet) return foundNet;
|
|
4389
4384
|
}
|
|
4390
|
-
return selectedCrypto?.networks?.[0] || { id: "
|
|
4385
|
+
return selectedCrypto?.networks?.[0] || { id: "polygon", name: "Polygon", symbol: "POLYGON" };
|
|
4391
4386
|
});
|
|
4392
4387
|
const [fiatAmount, setFiatAmount] = (0, import_react75.useState)("");
|
|
4393
4388
|
const [cryptoAmount, setCryptoAmount] = (0, import_react75.useState)("");
|
|
4394
4389
|
const [activeSource, setActiveSource] = (0, import_react75.useState)("FIAT");
|
|
4395
4390
|
const [isCalculating, setIsCalculating] = (0, import_react75.useState)(false);
|
|
4396
4391
|
const [rateDisplay, setRateDisplay] = (0, import_react75.useState)(null);
|
|
4392
|
+
const [currentRateKey, setCurrentRateKey] = (0, import_react75.useState)(null);
|
|
4397
4393
|
const [recipientAddress, setRecipientAddress] = (0, import_react75.useState)(defaultRecipientAddress);
|
|
4398
|
-
const [isAddressValid, setIsAddressValid] = (0, import_react75.useState)(
|
|
4394
|
+
const [isAddressValid, setIsAddressValid] = (0, import_react75.useState)(false);
|
|
4399
4395
|
const [isCryptoDialogOpen, setIsCryptoDialogOpen] = (0, import_react75.useState)(false);
|
|
4400
4396
|
const [isNetworkDialogOpen, setIsNetworkDialogOpen] = (0, import_react75.useState)(false);
|
|
4401
4397
|
const [isSubmitting, setIsSubmitting] = (0, import_react75.useState)(false);
|
|
@@ -4410,16 +4406,14 @@ var UniversalBuyCryptoPage = ({
|
|
|
4410
4406
|
}, [selectedCrypto]);
|
|
4411
4407
|
(0, import_react75.useEffect)(() => {
|
|
4412
4408
|
if (!recipientAddress.trim()) {
|
|
4413
|
-
setIsAddressValid(
|
|
4409
|
+
setIsAddressValid(false);
|
|
4414
4410
|
return;
|
|
4415
4411
|
}
|
|
4416
4412
|
const valid = validateWalletAddress(recipientAddress, selectedNetwork);
|
|
4417
4413
|
setIsAddressValid(valid);
|
|
4418
4414
|
}, [recipientAddress, selectedNetwork]);
|
|
4419
4415
|
const triggerRateCalculation = (0, import_react75.useCallback)((source, valFiat, valCrypto, currentCrypto) => {
|
|
4420
|
-
if (debounceTimerRef.current)
|
|
4421
|
-
clearTimeout(debounceTimerRef.current);
|
|
4422
|
-
}
|
|
4416
|
+
if (debounceTimerRef.current) clearTimeout(debounceTimerRef.current);
|
|
4423
4417
|
const targetVal = source === "FIAT" ? valFiat : valCrypto;
|
|
4424
4418
|
const numericVal = parseFloat(targetVal) || 0;
|
|
4425
4419
|
if (numericVal <= 0) {
|
|
@@ -4439,25 +4433,16 @@ var UniversalBuyCryptoPage = ({
|
|
|
4439
4433
|
crypto: currentCrypto,
|
|
4440
4434
|
fiat: fiatCurrency
|
|
4441
4435
|
});
|
|
4442
|
-
if (source === "FIAT")
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
}
|
|
4447
|
-
if (result.ratePerToken) {
|
|
4448
|
-
setRateDisplay(result.ratePerToken);
|
|
4449
|
-
}
|
|
4436
|
+
if (source === "FIAT") setCryptoAmount(result.cryptoAmount || "");
|
|
4437
|
+
else setFiatAmount(result.fiatAmount || "");
|
|
4438
|
+
if (result.ratePerToken) setRateDisplay(result.ratePerToken);
|
|
4439
|
+
if (result.rateKey) setCurrentRateKey(result.rateKey);
|
|
4450
4440
|
} catch {
|
|
4451
|
-
import_react_hot_toast12.default.error("Failed to calculate rate.");
|
|
4441
|
+
import_react_hot_toast12.default.error("Failed to calculate live rate.");
|
|
4452
4442
|
} finally {
|
|
4453
4443
|
setIsCalculating(false);
|
|
4454
4444
|
}
|
|
4455
4445
|
} else {
|
|
4456
|
-
if (source === "FIAT") {
|
|
4457
|
-
setCryptoAmount((numericVal / 1600).toFixed(2));
|
|
4458
|
-
} else {
|
|
4459
|
-
setFiatAmount((numericVal * 1600).toFixed(2));
|
|
4460
|
-
}
|
|
4461
4446
|
setIsCalculating(false);
|
|
4462
4447
|
}
|
|
4463
4448
|
}, 2e3);
|
|
@@ -4484,12 +4469,11 @@ var UniversalBuyCryptoPage = ({
|
|
|
4484
4469
|
const handleCheckout = async () => {
|
|
4485
4470
|
const numFiat = parseFloat(fiatAmount) || 0;
|
|
4486
4471
|
const numCrypto = parseFloat(cryptoAmount) || 0;
|
|
4487
|
-
if (numFiat <= 0 || numCrypto <= 0)
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
if (!recipientAddress.trim() || !isAddressValid) {
|
|
4491
|
-
return import_react_hot_toast12.default.error("Please enter a valid recipient wallet address.");
|
|
4472
|
+
if (numFiat <= 0 || numCrypto <= 0) return import_react_hot_toast12.default.error("Please enter a valid amount.");
|
|
4473
|
+
if (selectedNetwork.minimumWithdrawal && numCrypto < selectedNetwork.minimumWithdrawal) {
|
|
4474
|
+
return import_react_hot_toast12.default.error(`Minimum purchase for ${selectedNetwork.name} is ${selectedNetwork.minimumWithdrawal} ${selectedCrypto.code}`);
|
|
4492
4475
|
}
|
|
4476
|
+
if (!recipientAddress.trim() || !isAddressValid) return import_react_hot_toast12.default.error("Please enter a valid wallet address.");
|
|
4493
4477
|
if (onSubmitCheckout) {
|
|
4494
4478
|
setIsSubmitting(true);
|
|
4495
4479
|
try {
|
|
@@ -4499,16 +4483,16 @@ var UniversalBuyCryptoPage = ({
|
|
|
4499
4483
|
selectedCrypto,
|
|
4500
4484
|
selectedNetwork,
|
|
4501
4485
|
recipientAddress: recipientAddress.trim(),
|
|
4502
|
-
fiatCurrency
|
|
4486
|
+
fiatCurrency,
|
|
4487
|
+
rateKey: currentRateKey || void 0
|
|
4503
4488
|
});
|
|
4504
4489
|
} catch (err) {
|
|
4505
|
-
import_react_hot_toast12.default.error(err?.message || "Failed to process purchase.");
|
|
4506
4490
|
} finally {
|
|
4507
4491
|
setIsSubmitting(false);
|
|
4508
4492
|
}
|
|
4509
4493
|
}
|
|
4510
4494
|
};
|
|
4511
|
-
const isButtonDisabled = isSubmitting || isCalculating || !fiatAmount || !cryptoAmount || !isAddressValid;
|
|
4495
|
+
const isButtonDisabled = isSubmitting || isCalculating || !fiatAmount || !cryptoAmount || !isAddressValid || !currentRateKey;
|
|
4512
4496
|
return /* @__PURE__ */ import_react75.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react75.default.createElement(ManagedToaster, null), !hideBackButton && /* @__PURE__ */ import_react75.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react75.default.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ import_react75.default.createElement(import_react76.HugeiconsIcon, { icon: import_core_free_icons26.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ import_react75.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Buy Crypto"), /* @__PURE__ */ import_react75.default.createElement("p", { className: "text-xs text-neutral-500" }, "Purchase digital assets instantly in your local currency with direct wallet delivery.")), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-6 p-6 sm:p-8 rounded-3xl bg-white w-full " }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "relative flex flex-col gap-3" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "border border-neutral-200 rounded-2xl p-4 flex items-center justify-between transition-all focus-within:border-black" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-1 flex-1 pr-3 min-w-0" }, /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "You Pay (", fiatCurrency.code, ")"), isCalculating && activeSource === "CRYPTO" ? /* @__PURE__ */ import_react75.default.createElement("div", { className: "h-7 w-32 bg-neutral-100 animate-pulse rounded-md mt-1" }) : /* @__PURE__ */ import_react75.default.createElement(
|
|
4513
4497
|
"input",
|
|
4514
4498
|
{
|
|
@@ -4518,7 +4502,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4518
4502
|
onChange: handleFiatInputChange,
|
|
4519
4503
|
placeholder: "0.00",
|
|
4520
4504
|
disabled: isSubmitting,
|
|
4521
|
-
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300"
|
|
4505
|
+
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300 "
|
|
4522
4506
|
}
|
|
4523
4507
|
)), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex items-center gap-2 bg-neutral-50 rounded-full px-3 py-1.5 shrink-0 select-none" }, /* @__PURE__ */ import_react75.default.createElement(CircularLogo, { src: fiatCurrency.logoUrl, alt: fiatCurrency.code, fallbackText: fiatCurrency.code }), /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-xs text-black" }, fiatCurrency.code))), /* @__PURE__ */ import_react75.default.createElement("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-10" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "w-10 h-10 rounded-full bg-white border border-neutral-200 flex items-center justify-center" }, /* @__PURE__ */ import_react75.default.createElement("svg", { className: "w-4 h-4 text-black", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ import_react75.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })))), /* @__PURE__ */ import_react75.default.createElement("div", { className: "border border-neutral-200 rounded-2xl p-4 flex items-center justify-between transition-all focus-within:border-black" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-1 flex-1 pr-3 min-w-0" }, /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "You Receive"), isCalculating && activeSource === "FIAT" ? /* @__PURE__ */ import_react75.default.createElement("div", { className: "h-7 w-32 bg-neutral-100 animate-pulse rounded-md mt-1" }) : /* @__PURE__ */ import_react75.default.createElement(
|
|
4524
4508
|
"input",
|
|
@@ -4529,7 +4513,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4529
4513
|
onChange: handleCryptoInputChange,
|
|
4530
4514
|
placeholder: "0.00",
|
|
4531
4515
|
disabled: isSubmitting,
|
|
4532
|
-
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300"
|
|
4516
|
+
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300 "
|
|
4533
4517
|
}
|
|
4534
4518
|
)), /* @__PURE__ */ import_react75.default.createElement(
|
|
4535
4519
|
"button",
|
|
@@ -4548,7 +4532,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4548
4532
|
type: "button",
|
|
4549
4533
|
onClick: () => !readOnlyRecipientSection && setIsNetworkDialogOpen(true),
|
|
4550
4534
|
disabled: isSubmitting || selectedCrypto?.networks?.length <= 1 || readOnlyRecipientSection,
|
|
4551
|
-
className: `w-full px-2 py-3 text-sm bg-transparent border-b text-black transition-all outline-none flex items-center justify-between ${readOnlyRecipientSection ? "border-neutral-
|
|
4535
|
+
className: `w-full px-2 py-3 text-sm bg-transparent border-b text-black transition-all outline-none flex items-center justify-between ${readOnlyRecipientSection ? "border-neutral-200 cursor-default opacity-80" : "border-neutral-200 hover:border-black focus:border-black"}`
|
|
4552
4536
|
},
|
|
4553
4537
|
/* @__PURE__ */ import_react75.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react75.default.createElement(CircularLogo, { src: selectedNetwork.logoUrl || selectedCrypto.logoUrl, alt: selectedNetwork.name, fallbackText: selectedNetwork.symbol }), /* @__PURE__ */ import_react75.default.createElement("span", null, selectedNetwork.name)),
|
|
4554
4538
|
!readOnlyRecipientSection && selectedCrypto?.networks?.length > 1 && /* @__PURE__ */ import_react75.default.createElement("svg", { className: "w-4 h-4 text-neutral-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ import_react75.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
|
|
@@ -4575,34 +4559,20 @@ var UniversalBuyCryptoPage = ({
|
|
|
4575
4559
|
"Buy ",
|
|
4576
4560
|
selectedCrypto.code,
|
|
4577
4561
|
" Now"
|
|
4578
|
-
))), isCryptoDialogOpen && /* @__PURE__ */ import_react75.default.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "absolute inset-0", onClick: () => setIsCryptoDialogOpen(false) }), /* @__PURE__ */ import_react75.default.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react75.default.createElement(
|
|
4579
|
-
"button",
|
|
4580
|
-
{
|
|
4581
|
-
onClick: () => setIsCryptoDialogOpen(false),
|
|
4582
|
-
className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none"
|
|
4583
|
-
},
|
|
4584
|
-
/* @__PURE__ */ import_react75.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react75.default.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ import_react75.default.createElement("path", { d: "m6 6 12 12" }))
|
|
4585
|
-
), /* @__PURE__ */ import_react75.default.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ import_react75.default.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Cryptocurrency"), /* @__PURE__ */ import_react75.default.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Choose the digital asset you want to purchase.")), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, cryptoOptions.map((c) => {
|
|
4562
|
+
))), isCryptoDialogOpen && /* @__PURE__ */ import_react75.default.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "absolute inset-0", onClick: () => setIsCryptoDialogOpen(false) }), /* @__PURE__ */ import_react75.default.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react75.default.createElement("button", { onClick: () => setIsCryptoDialogOpen(false), className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none" }, /* @__PURE__ */ import_react75.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react75.default.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ import_react75.default.createElement("path", { d: "m6 6 12 12" }))), /* @__PURE__ */ import_react75.default.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ import_react75.default.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Cryptocurrency"), /* @__PURE__ */ import_react75.default.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Choose the digital asset you want to purchase.")), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, cryptoOptions.map((c) => {
|
|
4586
4563
|
const isSelected = c.code === selectedCrypto.code;
|
|
4587
4564
|
return /* @__PURE__ */ import_react75.default.createElement(
|
|
4588
4565
|
"button",
|
|
4589
4566
|
{
|
|
4590
4567
|
key: c.code,
|
|
4591
4568
|
onClick: () => handleCryptoSelect(c),
|
|
4592
|
-
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? " bg-neutral-50/50
|
|
4569
|
+
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? "border-black bg-neutral-50/50" : "border-transparent"}`
|
|
4593
4570
|
},
|
|
4594
4571
|
/* @__PURE__ */ import_react75.default.createElement(CircularLogo, { src: c.logoUrl, alt: c.name, fallbackText: c.code }),
|
|
4595
|
-
/* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-
|
|
4572
|
+
/* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-xs text-black truncate" }, c.name), /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-[11px] text-neutral-400" }, c.code)),
|
|
4596
4573
|
isSelected && /* @__PURE__ */ import_react75.default.createElement(import_react76.HugeiconsIcon, { icon: import_core_free_icons26.CheckmarkCircle02Icon, size: 16, className: "text-black" })
|
|
4597
4574
|
);
|
|
4598
|
-
}))))), isNetworkDialogOpen && /* @__PURE__ */ import_react75.default.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "absolute inset-0", onClick: () => setIsNetworkDialogOpen(false) }), /* @__PURE__ */ import_react75.default.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react75.default.createElement(
|
|
4599
|
-
"button",
|
|
4600
|
-
{
|
|
4601
|
-
onClick: () => setIsNetworkDialogOpen(false),
|
|
4602
|
-
className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none"
|
|
4603
|
-
},
|
|
4604
|
-
/* @__PURE__ */ import_react75.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react75.default.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ import_react75.default.createElement("path", { d: "m6 6 12 12" }))
|
|
4605
|
-
), /* @__PURE__ */ import_react75.default.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ import_react75.default.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Network"), /* @__PURE__ */ import_react75.default.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Ensure your receiving wallet supports this network.")), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, selectedCrypto?.networks?.map((net) => {
|
|
4575
|
+
}))))), isNetworkDialogOpen && /* @__PURE__ */ import_react75.default.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "absolute inset-0", onClick: () => setIsNetworkDialogOpen(false) }), /* @__PURE__ */ import_react75.default.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react75.default.createElement("button", { onClick: () => setIsNetworkDialogOpen(false), className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none" }, /* @__PURE__ */ import_react75.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react75.default.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ import_react75.default.createElement("path", { d: "m6 6 12 12" }))), /* @__PURE__ */ import_react75.default.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ import_react75.default.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ import_react75.default.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Network"), /* @__PURE__ */ import_react75.default.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Ensure your receiving wallet supports this network.")), /* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, selectedCrypto?.networks?.map((net) => {
|
|
4606
4576
|
const isSelected = net.id === selectedNetwork.id;
|
|
4607
4577
|
return /* @__PURE__ */ import_react75.default.createElement(
|
|
4608
4578
|
"button",
|
|
@@ -4612,10 +4582,10 @@ var UniversalBuyCryptoPage = ({
|
|
|
4612
4582
|
setSelectedNetwork(net);
|
|
4613
4583
|
setIsNetworkDialogOpen(false);
|
|
4614
4584
|
},
|
|
4615
|
-
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? " bg-neutral-50/50
|
|
4585
|
+
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? "border-black bg-neutral-50/50" : "border-transparent"}`
|
|
4616
4586
|
},
|
|
4617
4587
|
/* @__PURE__ */ import_react75.default.createElement(CircularLogo, { src: net.logoUrl || selectedCrypto.logoUrl, alt: net.name, fallbackText: net.symbol }),
|
|
4618
|
-
/* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-
|
|
4588
|
+
/* @__PURE__ */ import_react75.default.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-xs text-black truncate" }, net.name), /* @__PURE__ */ import_react75.default.createElement("span", { className: "text-[11px] text-neutral-400" }, net.symbol)),
|
|
4619
4589
|
isSelected && /* @__PURE__ */ import_react75.default.createElement(import_react76.HugeiconsIcon, { icon: import_core_free_icons26.CheckmarkCircle02Icon, size: 16, className: "text-black" })
|
|
4620
4590
|
);
|
|
4621
4591
|
}))))));
|
package/dist/index.mjs
CHANGED
|
@@ -2902,12 +2902,12 @@ var UniversalSecurityPage = ({
|
|
|
2902
2902
|
className: "w-full"
|
|
2903
2903
|
},
|
|
2904
2904
|
hasPasscode ? "Update Passcode" : "Set Passcode"
|
|
2905
|
-
)))))), showPasskeyModal && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ React25.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon6, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ React25.createElement("
|
|
2905
|
+
)))))), showPasskeyModal && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ React25.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon6, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ React25.createElement("p", { className: "text-[13px] text-neutral-500 mb-8 leading-relaxed" }, "Use your device's biometrics (Face ID, Touch ID, or PIN) to securely sign into your account without needing a password."), /* @__PURE__ */ React25.createElement(
|
|
2906
2906
|
ThreeDActionButton,
|
|
2907
2907
|
{
|
|
2908
2908
|
onClick: submitEnablePasskey,
|
|
2909
2909
|
isLoading: isSubmitting,
|
|
2910
|
-
className: "w-full
|
|
2910
|
+
className: "w-full"
|
|
2911
2911
|
},
|
|
2912
2912
|
"Create Passkey"
|
|
2913
2913
|
)))));
|
|
@@ -4028,7 +4028,7 @@ var UniversalReferralPage = ({
|
|
|
4028
4028
|
const finalSrc = src || fallbackUrl;
|
|
4029
4029
|
return /* @__PURE__ */ React42.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: Loading03Icon17, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ React42.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
4030
4030
|
};
|
|
4031
|
-
return /* @__PURE__ */ React42.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React42.createElement(ManagedToaster, null), /* @__PURE__ */ React42.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React42.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: ArrowLeft01Icon10, size: 16 }), " Back")), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-4 mb-6 px-1" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ React42.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ React42.createElement("div", { className: "bg-[#143731] rounded-3xl p-
|
|
4031
|
+
return /* @__PURE__ */ React42.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React42.createElement(ManagedToaster, null), /* @__PURE__ */ React42.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React42.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: ArrowLeft01Icon10, size: 16 }), " Back")), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-4 mb-6 px-1" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ React42.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ React42.createElement("div", { className: "bg-[#143731] rounded-3xl p-6 relative overflow-hidden flex flex-col min-h-25 w-full mt-2" }, /* @__PURE__ */ React42.createElement("div", { className: "relative z-10 flex flex-col items-start" }, /* @__PURE__ */ React42.createElement("p", { className: "text-[11px] text-white leading-tight mb-1" }, /* @__PURE__ */ React42.createElement("span", { className: "text-white/60" }, "AFT Balance")), isLoading ? /* @__PURE__ */ React42.createElement("div", { className: "h-8 w-32 bg-white/10 animate-pulse rounded mt-2" }) : /* @__PURE__ */ React42.createElement("span", { className: "text-lg text-white tracking-tight mt-1" }, referralCoins)))), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-6 p-4 rounded-3xl bg-white w-full" }, /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React42.createElement("div", { className: "border border-neutral-200 rounded-xl p-4 flex items-center justify-between" }, /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ React42.createElement("div", { className: "h-6 w-24 bg-neutral-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ React42.createElement("span", { className: "text-sm text-black tracking-widest" }, referralCode)), /* @__PURE__ */ React42.createElement(
|
|
4032
4032
|
"button",
|
|
4033
4033
|
{
|
|
4034
4034
|
onClick: handleCopyCode,
|
|
@@ -4391,27 +4391,23 @@ var UniversalBuyCryptoPage = ({
|
|
|
4391
4391
|
const found = cryptoOptions.find((c) => c.code === defaultCryptoCode);
|
|
4392
4392
|
if (found) return found;
|
|
4393
4393
|
}
|
|
4394
|
-
return cryptoOptions[0]
|
|
4395
|
-
code: "USDC",
|
|
4396
|
-
name: "USD Coin",
|
|
4397
|
-
logoUrl: "https://cryptologos.cc/logos/usd-coin-usdc-logo.png",
|
|
4398
|
-
networks: [{ id: "POLYGON", name: "Polygon (MATIC)", symbol: "POLYGON" }]
|
|
4399
|
-
};
|
|
4394
|
+
return cryptoOptions[0];
|
|
4400
4395
|
});
|
|
4401
4396
|
const [selectedNetwork, setSelectedNetwork] = useState31(() => {
|
|
4402
4397
|
if (defaultNetworkId && selectedCrypto?.networks) {
|
|
4403
4398
|
const foundNet = selectedCrypto.networks.find((n) => n.id === defaultNetworkId);
|
|
4404
4399
|
if (foundNet) return foundNet;
|
|
4405
4400
|
}
|
|
4406
|
-
return selectedCrypto?.networks?.[0] || { id: "
|
|
4401
|
+
return selectedCrypto?.networks?.[0] || { id: "polygon", name: "Polygon", symbol: "POLYGON" };
|
|
4407
4402
|
});
|
|
4408
4403
|
const [fiatAmount, setFiatAmount] = useState31("");
|
|
4409
4404
|
const [cryptoAmount, setCryptoAmount] = useState31("");
|
|
4410
4405
|
const [activeSource, setActiveSource] = useState31("FIAT");
|
|
4411
4406
|
const [isCalculating, setIsCalculating] = useState31(false);
|
|
4412
4407
|
const [rateDisplay, setRateDisplay] = useState31(null);
|
|
4408
|
+
const [currentRateKey, setCurrentRateKey] = useState31(null);
|
|
4413
4409
|
const [recipientAddress, setRecipientAddress] = useState31(defaultRecipientAddress);
|
|
4414
|
-
const [isAddressValid, setIsAddressValid] = useState31(
|
|
4410
|
+
const [isAddressValid, setIsAddressValid] = useState31(false);
|
|
4415
4411
|
const [isCryptoDialogOpen, setIsCryptoDialogOpen] = useState31(false);
|
|
4416
4412
|
const [isNetworkDialogOpen, setIsNetworkDialogOpen] = useState31(false);
|
|
4417
4413
|
const [isSubmitting, setIsSubmitting] = useState31(false);
|
|
@@ -4426,16 +4422,14 @@ var UniversalBuyCryptoPage = ({
|
|
|
4426
4422
|
}, [selectedCrypto]);
|
|
4427
4423
|
useEffect17(() => {
|
|
4428
4424
|
if (!recipientAddress.trim()) {
|
|
4429
|
-
setIsAddressValid(
|
|
4425
|
+
setIsAddressValid(false);
|
|
4430
4426
|
return;
|
|
4431
4427
|
}
|
|
4432
4428
|
const valid = validateWalletAddress(recipientAddress, selectedNetwork);
|
|
4433
4429
|
setIsAddressValid(valid);
|
|
4434
4430
|
}, [recipientAddress, selectedNetwork]);
|
|
4435
4431
|
const triggerRateCalculation = useCallback((source, valFiat, valCrypto, currentCrypto) => {
|
|
4436
|
-
if (debounceTimerRef.current)
|
|
4437
|
-
clearTimeout(debounceTimerRef.current);
|
|
4438
|
-
}
|
|
4432
|
+
if (debounceTimerRef.current) clearTimeout(debounceTimerRef.current);
|
|
4439
4433
|
const targetVal = source === "FIAT" ? valFiat : valCrypto;
|
|
4440
4434
|
const numericVal = parseFloat(targetVal) || 0;
|
|
4441
4435
|
if (numericVal <= 0) {
|
|
@@ -4455,25 +4449,16 @@ var UniversalBuyCryptoPage = ({
|
|
|
4455
4449
|
crypto: currentCrypto,
|
|
4456
4450
|
fiat: fiatCurrency
|
|
4457
4451
|
});
|
|
4458
|
-
if (source === "FIAT")
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
}
|
|
4463
|
-
if (result.ratePerToken) {
|
|
4464
|
-
setRateDisplay(result.ratePerToken);
|
|
4465
|
-
}
|
|
4452
|
+
if (source === "FIAT") setCryptoAmount(result.cryptoAmount || "");
|
|
4453
|
+
else setFiatAmount(result.fiatAmount || "");
|
|
4454
|
+
if (result.ratePerToken) setRateDisplay(result.ratePerToken);
|
|
4455
|
+
if (result.rateKey) setCurrentRateKey(result.rateKey);
|
|
4466
4456
|
} catch {
|
|
4467
|
-
toast11.error("Failed to calculate rate.");
|
|
4457
|
+
toast11.error("Failed to calculate live rate.");
|
|
4468
4458
|
} finally {
|
|
4469
4459
|
setIsCalculating(false);
|
|
4470
4460
|
}
|
|
4471
4461
|
} else {
|
|
4472
|
-
if (source === "FIAT") {
|
|
4473
|
-
setCryptoAmount((numericVal / 1600).toFixed(2));
|
|
4474
|
-
} else {
|
|
4475
|
-
setFiatAmount((numericVal * 1600).toFixed(2));
|
|
4476
|
-
}
|
|
4477
4462
|
setIsCalculating(false);
|
|
4478
4463
|
}
|
|
4479
4464
|
}, 2e3);
|
|
@@ -4500,12 +4485,11 @@ var UniversalBuyCryptoPage = ({
|
|
|
4500
4485
|
const handleCheckout = async () => {
|
|
4501
4486
|
const numFiat = parseFloat(fiatAmount) || 0;
|
|
4502
4487
|
const numCrypto = parseFloat(cryptoAmount) || 0;
|
|
4503
|
-
if (numFiat <= 0 || numCrypto <= 0)
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
if (!recipientAddress.trim() || !isAddressValid) {
|
|
4507
|
-
return toast11.error("Please enter a valid recipient wallet address.");
|
|
4488
|
+
if (numFiat <= 0 || numCrypto <= 0) return toast11.error("Please enter a valid amount.");
|
|
4489
|
+
if (selectedNetwork.minimumWithdrawal && numCrypto < selectedNetwork.minimumWithdrawal) {
|
|
4490
|
+
return toast11.error(`Minimum purchase for ${selectedNetwork.name} is ${selectedNetwork.minimumWithdrawal} ${selectedCrypto.code}`);
|
|
4508
4491
|
}
|
|
4492
|
+
if (!recipientAddress.trim() || !isAddressValid) return toast11.error("Please enter a valid wallet address.");
|
|
4509
4493
|
if (onSubmitCheckout) {
|
|
4510
4494
|
setIsSubmitting(true);
|
|
4511
4495
|
try {
|
|
@@ -4515,16 +4499,16 @@ var UniversalBuyCryptoPage = ({
|
|
|
4515
4499
|
selectedCrypto,
|
|
4516
4500
|
selectedNetwork,
|
|
4517
4501
|
recipientAddress: recipientAddress.trim(),
|
|
4518
|
-
fiatCurrency
|
|
4502
|
+
fiatCurrency,
|
|
4503
|
+
rateKey: currentRateKey || void 0
|
|
4519
4504
|
});
|
|
4520
4505
|
} catch (err) {
|
|
4521
|
-
toast11.error(err?.message || "Failed to process purchase.");
|
|
4522
4506
|
} finally {
|
|
4523
4507
|
setIsSubmitting(false);
|
|
4524
4508
|
}
|
|
4525
4509
|
}
|
|
4526
4510
|
};
|
|
4527
|
-
const isButtonDisabled = isSubmitting || isCalculating || !fiatAmount || !cryptoAmount || !isAddressValid;
|
|
4511
|
+
const isButtonDisabled = isSubmitting || isCalculating || !fiatAmount || !cryptoAmount || !isAddressValid || !currentRateKey;
|
|
4528
4512
|
return /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React45.createElement(ManagedToaster, null), !hideBackButton && /* @__PURE__ */ React45.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React45.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon: ArrowLeft01Icon12, size: 16 }), " Back")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React45.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Buy Crypto"), /* @__PURE__ */ React45.createElement("p", { className: "text-xs text-neutral-500" }, "Purchase digital assets instantly in your local currency with direct wallet delivery.")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-6 p-6 sm:p-8 rounded-3xl bg-white w-full " }, /* @__PURE__ */ React45.createElement("div", { className: "relative flex flex-col gap-3" }, /* @__PURE__ */ React45.createElement("div", { className: "border border-neutral-200 rounded-2xl p-4 flex items-center justify-between transition-all focus-within:border-black" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-1 flex-1 pr-3 min-w-0" }, /* @__PURE__ */ React45.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "You Pay (", fiatCurrency.code, ")"), isCalculating && activeSource === "CRYPTO" ? /* @__PURE__ */ React45.createElement("div", { className: "h-7 w-32 bg-neutral-100 animate-pulse rounded-md mt-1" }) : /* @__PURE__ */ React45.createElement(
|
|
4529
4513
|
"input",
|
|
4530
4514
|
{
|
|
@@ -4534,7 +4518,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4534
4518
|
onChange: handleFiatInputChange,
|
|
4535
4519
|
placeholder: "0.00",
|
|
4536
4520
|
disabled: isSubmitting,
|
|
4537
|
-
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300"
|
|
4521
|
+
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300 "
|
|
4538
4522
|
}
|
|
4539
4523
|
)), /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-2 bg-neutral-50 rounded-full px-3 py-1.5 shrink-0 select-none" }, /* @__PURE__ */ React45.createElement(CircularLogo, { src: fiatCurrency.logoUrl, alt: fiatCurrency.code, fallbackText: fiatCurrency.code }), /* @__PURE__ */ React45.createElement("span", { className: "text-xs text-black" }, fiatCurrency.code))), /* @__PURE__ */ React45.createElement("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-10" }, /* @__PURE__ */ React45.createElement("div", { className: "w-10 h-10 rounded-full bg-white border border-neutral-200 flex items-center justify-center" }, /* @__PURE__ */ React45.createElement("svg", { className: "w-4 h-4 text-black", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React45.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })))), /* @__PURE__ */ React45.createElement("div", { className: "border border-neutral-200 rounded-2xl p-4 flex items-center justify-between transition-all focus-within:border-black" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-1 flex-1 pr-3 min-w-0" }, /* @__PURE__ */ React45.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "You Receive"), isCalculating && activeSource === "FIAT" ? /* @__PURE__ */ React45.createElement("div", { className: "h-7 w-32 bg-neutral-100 animate-pulse rounded-md mt-1" }) : /* @__PURE__ */ React45.createElement(
|
|
4540
4524
|
"input",
|
|
@@ -4545,7 +4529,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4545
4529
|
onChange: handleCryptoInputChange,
|
|
4546
4530
|
placeholder: "0.00",
|
|
4547
4531
|
disabled: isSubmitting,
|
|
4548
|
-
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300"
|
|
4532
|
+
className: "text-lg sm:text-xl text-black bg-transparent outline-none w-full placeholder-neutral-300 "
|
|
4549
4533
|
}
|
|
4550
4534
|
)), /* @__PURE__ */ React45.createElement(
|
|
4551
4535
|
"button",
|
|
@@ -4564,7 +4548,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4564
4548
|
type: "button",
|
|
4565
4549
|
onClick: () => !readOnlyRecipientSection && setIsNetworkDialogOpen(true),
|
|
4566
4550
|
disabled: isSubmitting || selectedCrypto?.networks?.length <= 1 || readOnlyRecipientSection,
|
|
4567
|
-
className: `w-full px-2 py-3 text-sm bg-transparent border-b text-black transition-all outline-none flex items-center justify-between ${readOnlyRecipientSection ? "border-neutral-
|
|
4551
|
+
className: `w-full px-2 py-3 text-sm bg-transparent border-b text-black transition-all outline-none flex items-center justify-between ${readOnlyRecipientSection ? "border-neutral-200 cursor-default opacity-80" : "border-neutral-200 hover:border-black focus:border-black"}`
|
|
4568
4552
|
},
|
|
4569
4553
|
/* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React45.createElement(CircularLogo, { src: selectedNetwork.logoUrl || selectedCrypto.logoUrl, alt: selectedNetwork.name, fallbackText: selectedNetwork.symbol }), /* @__PURE__ */ React45.createElement("span", null, selectedNetwork.name)),
|
|
4570
4554
|
!readOnlyRecipientSection && selectedCrypto?.networks?.length > 1 && /* @__PURE__ */ React45.createElement("svg", { className: "w-4 h-4 text-neutral-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React45.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
|
|
@@ -4591,34 +4575,20 @@ var UniversalBuyCryptoPage = ({
|
|
|
4591
4575
|
"Buy ",
|
|
4592
4576
|
selectedCrypto.code,
|
|
4593
4577
|
" Now"
|
|
4594
|
-
))), isCryptoDialogOpen && /* @__PURE__ */ React45.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ React45.createElement("div", { className: "absolute inset-0", onClick: () => setIsCryptoDialogOpen(false) }), /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React45.createElement(
|
|
4595
|
-
"button",
|
|
4596
|
-
{
|
|
4597
|
-
onClick: () => setIsCryptoDialogOpen(false),
|
|
4598
|
-
className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none"
|
|
4599
|
-
},
|
|
4600
|
-
/* @__PURE__ */ React45.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React45.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ React45.createElement("path", { d: "m6 6 12 12" }))
|
|
4601
|
-
), /* @__PURE__ */ React45.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ React45.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ React45.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Cryptocurrency"), /* @__PURE__ */ React45.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Choose the digital asset you want to purchase.")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, cryptoOptions.map((c) => {
|
|
4578
|
+
))), isCryptoDialogOpen && /* @__PURE__ */ React45.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ React45.createElement("div", { className: "absolute inset-0", onClick: () => setIsCryptoDialogOpen(false) }), /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React45.createElement("button", { onClick: () => setIsCryptoDialogOpen(false), className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none" }, /* @__PURE__ */ React45.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React45.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ React45.createElement("path", { d: "m6 6 12 12" }))), /* @__PURE__ */ React45.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ React45.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ React45.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Cryptocurrency"), /* @__PURE__ */ React45.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Choose the digital asset you want to purchase.")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, cryptoOptions.map((c) => {
|
|
4602
4579
|
const isSelected = c.code === selectedCrypto.code;
|
|
4603
4580
|
return /* @__PURE__ */ React45.createElement(
|
|
4604
4581
|
"button",
|
|
4605
4582
|
{
|
|
4606
4583
|
key: c.code,
|
|
4607
4584
|
onClick: () => handleCryptoSelect(c),
|
|
4608
|
-
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? " bg-neutral-50/50
|
|
4585
|
+
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? "border-black bg-neutral-50/50" : "border-transparent"}`
|
|
4609
4586
|
},
|
|
4610
4587
|
/* @__PURE__ */ React45.createElement(CircularLogo, { src: c.logoUrl, alt: c.name, fallbackText: c.code }),
|
|
4611
|
-
/* @__PURE__ */ React45.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ React45.createElement("span", { className: "text-
|
|
4588
|
+
/* @__PURE__ */ React45.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ React45.createElement("span", { className: "text-xs text-black truncate" }, c.name), /* @__PURE__ */ React45.createElement("span", { className: "text-[11px] text-neutral-400" }, c.code)),
|
|
4612
4589
|
isSelected && /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon: CheckmarkCircle02Icon, size: 16, className: "text-black" })
|
|
4613
4590
|
);
|
|
4614
|
-
}))))), isNetworkDialogOpen && /* @__PURE__ */ React45.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ React45.createElement("div", { className: "absolute inset-0", onClick: () => setIsNetworkDialogOpen(false) }), /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React45.createElement(
|
|
4615
|
-
"button",
|
|
4616
|
-
{
|
|
4617
|
-
onClick: () => setIsNetworkDialogOpen(false),
|
|
4618
|
-
className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none"
|
|
4619
|
-
},
|
|
4620
|
-
/* @__PURE__ */ React45.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React45.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ React45.createElement("path", { d: "m6 6 12 12" }))
|
|
4621
|
-
), /* @__PURE__ */ React45.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ React45.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ React45.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Network"), /* @__PURE__ */ React45.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Ensure your receiving wallet supports this network.")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, selectedCrypto?.networks?.map((net) => {
|
|
4591
|
+
}))))), isNetworkDialogOpen && /* @__PURE__ */ React45.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ React45.createElement("div", { className: "absolute inset-0", onClick: () => setIsNetworkDialogOpen(false) }), /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React45.createElement("button", { onClick: () => setIsNetworkDialogOpen(false), className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none" }, /* @__PURE__ */ React45.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React45.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ React45.createElement("path", { d: "m6 6 12 12" }))), /* @__PURE__ */ React45.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ React45.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ React45.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Network"), /* @__PURE__ */ React45.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Ensure your receiving wallet supports this network.")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-2 max-h-72 overflow-y-auto custom-scrollbar pr-1" }, selectedCrypto?.networks?.map((net) => {
|
|
4622
4592
|
const isSelected = net.id === selectedNetwork.id;
|
|
4623
4593
|
return /* @__PURE__ */ React45.createElement(
|
|
4624
4594
|
"button",
|
|
@@ -4628,10 +4598,10 @@ var UniversalBuyCryptoPage = ({
|
|
|
4628
4598
|
setSelectedNetwork(net);
|
|
4629
4599
|
setIsNetworkDialogOpen(false);
|
|
4630
4600
|
},
|
|
4631
|
-
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? " bg-neutral-50/50
|
|
4601
|
+
className: `flex items-center gap-4 p-3 rounded-full hover:bg-neutral-50 transition-colors text-left outline-none border ${isSelected ? "border-black bg-neutral-50/50" : "border-transparent"}`
|
|
4632
4602
|
},
|
|
4633
4603
|
/* @__PURE__ */ React45.createElement(CircularLogo, { src: net.logoUrl || selectedCrypto.logoUrl, alt: net.name, fallbackText: net.symbol }),
|
|
4634
|
-
/* @__PURE__ */ React45.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ React45.createElement("span", { className: "text-
|
|
4604
|
+
/* @__PURE__ */ React45.createElement("div", { className: "flex flex-col flex-1 min-w-0" }, /* @__PURE__ */ React45.createElement("span", { className: "text-xs text-black truncate" }, net.name), /* @__PURE__ */ React45.createElement("span", { className: "text-[11px] text-neutral-400" }, net.symbol)),
|
|
4635
4605
|
isSelected && /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon: CheckmarkCircle02Icon, size: 16, className: "text-black" })
|
|
4636
4606
|
);
|
|
4637
4607
|
}))))));
|