@moneymq/react 0.3.2 → 0.7.0

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.mjs CHANGED
@@ -407,6 +407,10 @@ import Lottie from "lottie-react";
407
407
  var logo_animation_default = { assets: [{ id: "4", layers: [{ ind: 3, ty: 4, ks: {}, ip: 0, op: 58, st: 0, shapes: [{ ty: "rc", p: { a: 0, k: [40, 40] }, r: { a: 0, k: 0 }, s: { a: 0, k: [80, 80] } }, { ty: "fl", c: { a: 0, k: [0, 0, 0, 0] }, o: { a: 0, k: 0 } }] }, { ind: 0, ty: 4, ks: { s: { a: 0, k: [133.33, 133.33] } }, ip: 0, op: 58, st: 0, shapes: [{ ty: "gr", it: [{ ty: "gr", it: [{ ty: "sh", ks: { a: 0, k: { c: true, i: [[0, 0], [0, 20.55], [20.55, 0], [0, -20.55], [-20.55, 0]], o: [[20.55, 0], [0, -20.55], [-20.55, 0], [0, 20.55], [0, 0]], v: [[39.65, 76.85], [76.85, 39.65], [39.65, 2.43], [2.44, 39.65], [39.65, 76.85]] } } }, { ty: "st", c: { a: 0, k: [0, 0, 0, 1] }, lc: 1, lj: 1, ml: 10, o: { a: 0, k: 100 }, w: { a: 0, k: 4.87 } }, { ty: "fl", c: { a: 0, k: [1, 1, 1, 1] }, o: { a: 0, k: 100 } }, { ty: "tr", o: { a: 0, k: 100 }, s: { a: 0, k: [75, 75] } }] }, { ty: "tr", o: { a: 0, k: 100 } }] }] }] }, { id: "7", layers: [{ ind: 6, ty: 0, ks: {}, w: 80, h: 80, ip: 0, op: 58, st: 0, refId: "4" }] }, { id: "12", layers: [{ ind: 11, ty: 4, ks: {}, ip: 0, op: 58, st: 0, shapes: [{ ty: "rc", p: { a: 0, k: [40, 40] }, r: { a: 0, k: 0 }, s: { a: 0, k: [80, 80] } }, { ty: "fl", c: { a: 0, k: [0, 0, 0, 0] }, o: { a: 0, k: 0 } }] }, { ind: 0, ty: 4, ks: { s: { a: 0, k: [133.33, 133.33] } }, ip: 0, op: 58, st: 0, shapes: [{ ty: "gr", it: [{ ty: "gr", it: [{ ty: "sh", ks: { a: 0, k: { c: true, i: [[0, 0], [0, 20.55], [20.55, 0], [0, -20.55], [-20.55, 0]], o: [[20.55, 0], [0, -20.55], [-20.55, 0], [0, 20.55], [0, 0]], v: [[39.65, 76.85], [76.85, 39.65], [39.65, 2.43], [2.44, 39.65], [39.65, 76.85]] } } }, { ty: "st", c: { a: 0, k: [0, 0, 0, 1] }, lc: 1, lj: 1, ml: 10, o: { a: 0, k: 100 }, w: { a: 0, k: 4.87 } }, { ty: "fl", c: { a: 0, k: [1, 1, 1, 1] }, o: { a: 0, k: 100 } }, { ty: "tr", o: { a: 0, k: 100 }, s: { a: 0, k: [75, 75] } }] }, { ty: "tr", o: { a: 0, k: 100 } }] }] }] }, { id: "17", layers: [{ ind: 16, ty: 4, ks: {}, ip: 0, op: 58, st: 0, shapes: [{ ty: "rc", p: { a: 0, k: [40, 40] }, r: { a: 0, k: 0 }, s: { a: 0, k: [80, 80] } }, { ty: "fl", c: { a: 0, k: [0, 0, 0, 0] }, o: { a: 0, k: 0 } }] }, { ind: 0, ty: 4, ks: { s: { a: 0, k: [133.33, 133.33] } }, ip: 0, op: 58, st: 0, shapes: [{ ty: "gr", it: [{ ty: "gr", it: [{ ty: "sh", ks: { a: 0, k: { c: true, i: [[0, 0], [0, 20.55], [20.55, 0], [0, -20.55], [-20.55, 0]], o: [[20.55, 0], [0, -20.55], [-20.55, 0], [0, 20.55], [0, 0]], v: [[39.65, 76.85], [76.85, 39.65], [39.65, 2.43], [2.44, 39.65], [39.65, 76.85]] } } }, { ty: "st", c: { a: 0, k: [0, 0, 0, 1] }, lc: 1, lj: 1, ml: 10, o: { a: 0, k: 100 }, w: { a: 0, k: 4.87 } }, { ty: "fl", c: { a: 0, k: [1, 1, 1, 1] }, o: { a: 0, k: 100 } }, { ty: "tr", o: { a: 0, k: 100 }, s: { a: 0, k: [75, 75] } }] }, { ty: "tr", o: { a: 0, k: 100 } }] }] }] }, { id: "22", layers: [{ ind: 21, ty: 4, ks: {}, ip: 0, op: 58, st: 0, shapes: [{ ty: "rc", p: { a: 0, k: [40, 40] }, r: { a: 0, k: 0 }, s: { a: 0, k: [80, 80] } }, { ty: "fl", c: { a: 0, k: [0, 0, 0, 0] }, o: { a: 0, k: 0 } }] }, { ind: 0, ty: 4, ks: { s: { a: 0, k: [133.33, 133.33] } }, ip: 0, op: 58, st: 0, shapes: [{ ty: "gr", it: [{ ty: "gr", it: [{ ty: "sh", ks: { a: 0, k: { c: true, i: [[0, 0], [0, 20.55], [20.55, 0], [0, -20.55], [-20.55, 0]], o: [[20.55, 0], [0, -20.55], [-20.55, 0], [0, 20.55], [0, 0]], v: [[39.65, 76.85], [76.85, 39.65], [39.65, 2.43], [2.44, 39.65], [39.65, 76.85]] } } }, { ty: "st", c: { a: 0, k: [0, 0, 0, 1] }, lc: 1, lj: 1, ml: 10, o: { a: 0, k: 100 }, w: { a: 0, k: 4.87 } }, { ty: "fl", c: { a: 0, k: [1, 1, 1, 1] }, o: { a: 0, k: 100 } }, { ty: "tr", o: { a: 0, k: 100 }, s: { a: 0, k: [75, 75] } }] }, { ty: "tr", o: { a: 0, k: 100 } }] }] }] }], fr: 60, h: 200, ip: 0, layers: [{ ind: 9, ty: 0, parent: 2, ks: { a: { a: 0, k: [40, 40] }, o: { a: 1, k: [{ t: 0, s: [100], h: 1 }, { t: 7.2, s: [100], h: 1 }, { t: 7.2, s: [0], h: 1 }, { t: 57, s: [0], h: 1 }] }, p: { a: 1, k: [{ t: 0, s: [119, 40], i: { x: [0, 1], y: [1, 1] }, o: { x: [0.384, 0], y: [0, 0] } }, { t: 48, s: [219, 40], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 57, s: [219, 40], h: 1 }] }, s: { a: 1, k: [{ t: 0, s: [100, 100], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 5.4, s: [100, 100], i: { x: [0, 0], y: [1, 1] }, o: { x: [0.5, 0.5], y: [0, 0] } }, { t: 7.2, s: [103, 103], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 57, s: [103, 103], h: 1 }] } }, w: 80, h: 80, ip: 0, op: 58, st: 0, refId: "7" }, { ind: 14, ty: 0, parent: 10, ks: {}, w: 80, h: 80, ip: 0, op: 58, st: 0, refId: "12" }, { ind: 10, ty: 3, parent: 2, ks: { p: { a: 1, k: [{ t: 0, s: [39, 0], i: { x: [0, 1], y: [1, 1] }, o: { x: [0.384, 0], y: [0, 0] } }, { t: 48, s: [79, 0], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 57, s: [79, 0], h: 1 }] } }, ip: 0, op: 58, st: 0 }, { ind: 19, ty: 0, parent: 15, ks: {}, w: 80, h: 80, ip: 0, op: 58, st: 0, refId: "17" }, { ind: 15, ty: 3, parent: 2, ks: { p: { a: 1, k: [{ t: 0, s: [0, 0], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 7.2, s: [0, 0], i: { x: [0, 1], y: [1, 1] }, o: { x: [0.384, 0], y: [0, 0] } }, { t: 55.2, s: [39, 0], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 57, s: [39, 0], h: 1 }] } }, ip: 0, op: 58, st: 0 }, { ind: 24, ty: 0, parent: 20, ks: {}, w: 80, h: 80, ip: 0, op: 58, st: 0, refId: "22" }, { ind: 20, ty: 3, parent: 2, ks: { a: { a: 0, k: [40, 40] }, p: { a: 0, k: [40, 40] }, s: { a: 1, k: [{ t: 0, s: [70, 70], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 13.8, s: [70, 70], i: { x: [0, 0], y: [1, 1] }, o: { x: [0.5, 0.5], y: [0, 0] } }, { t: 37.2, s: [100, 100], i: { x: [1, 1], y: [1, 1] }, o: { x: [0, 0], y: [0, 0] } }, { t: 57, s: [100, 100], h: 1 }] } }, ip: 0, op: 58, st: 0 }, { ind: 2, ty: 3, parent: 1, ks: { p: { a: 0, k: [21, 61] } }, ip: 0, op: 58, st: 0 }, { ind: 1, ty: 3, parent: 0, ks: {}, ip: 0, op: 58, st: 0 }, { ind: 0, ty: 3, ks: {}, ip: 0, op: 58, st: 0 }], meta: { g: "https://jitter.video" }, op: 57, v: "5.7.4", w: 200 };
408
408
 
409
409
  // src/checkout-modal.tsx
410
+ import {
411
+ EventStream,
412
+ isPaymentSettlementSucceeded
413
+ } from "@moneymq/sdk";
410
414
  import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
411
415
  function encodeFormData(data) {
412
416
  const params = new URLSearchParams();
@@ -428,22 +432,22 @@ function encodeFormData(data) {
428
432
  function normalizeRpcUrl2(url) {
429
433
  return url.replace("0.0.0.0", "localhost").replace("127.0.0.1", "localhost");
430
434
  }
431
- async function makeRequestWith402Handling(url, method, body, secretKeyHex, rpcUrl, headers = {}) {
435
+ async function makeRequestWith402Handling(url, method, body, secretKeyHex, rpcUrl, headers = {}, useJson = false) {
432
436
  console.log(`[MoneyMQ] Making ${method} request to ${url}`);
433
- const formData = body ? encodeFormData(body) : void 0;
437
+ const contentType = useJson ? "application/json" : "application/x-www-form-urlencoded";
438
+ const requestBody = body ? useJson ? JSON.stringify(body) : encodeFormData(body) : void 0;
434
439
  let response = await fetch(url, {
435
440
  method,
436
441
  headers: {
437
- "Content-Type": "application/x-www-form-urlencoded",
442
+ "Content-Type": contentType,
438
443
  ...headers
439
444
  },
440
- body: formData
445
+ body: requestBody
441
446
  });
442
447
  let data = await response.json();
443
448
  console.log(`[MoneyMQ] Response status: ${response.status}`, data);
444
449
  if (response.status === 402) {
445
- console.log("[MoneyMQ] \u{1F4B3} 402 Payment Required - processing payment...");
446
- const paymentRequirements = data?.payment_requirements || data?.error?.payment_requirements || [];
450
+ const paymentRequirements = data?.accepts || data?.payment_requirements || data?.error?.payment_requirements || [];
447
451
  if (paymentRequirements.length === 0) {
448
452
  console.warn("[MoneyMQ] \u26A0\uFE0F No payment requirements found in 402 response");
449
453
  throw new Error("Payment required but no payment requirements provided");
@@ -454,8 +458,11 @@ async function makeRequestWith402Handling(url, method, body, secretKeyHex, rpcUr
454
458
  const signer = await createSigner("solana", secretKeyHex, {
455
459
  svmConfig: rpcUrl
456
460
  });
457
- const selectedPaymentRequirement = selectPaymentRequirements(paymentRequirements, "solana", "exact");
458
- console.log(`[MoneyMQ] \u{1F4B0} Creating payment for ${selectedPaymentRequirement.network}...`);
461
+ const selectedPaymentRequirement = selectPaymentRequirements(
462
+ paymentRequirements,
463
+ "solana",
464
+ "exact"
465
+ );
459
466
  const paymentHeaderValue = await createPaymentHeader(
460
467
  signer,
461
468
  1,
@@ -467,15 +474,14 @@ async function makeRequestWith402Handling(url, method, body, secretKeyHex, rpcUr
467
474
  }
468
475
  }
469
476
  );
470
- console.log("[MoneyMQ] \u2705 Payment header created, retrying request...");
471
477
  response = await fetch(url, {
472
478
  method,
473
479
  headers: {
474
- "Content-Type": "application/x-www-form-urlencoded",
480
+ "Content-Type": contentType,
475
481
  "X-Payment": paymentHeaderValue,
476
482
  ...headers
477
483
  },
478
- body: formData
484
+ body: requestBody
479
485
  });
480
486
  data = await response.json();
481
487
  console.log(`[MoneyMQ] Retry response status: ${response.status}`, data);
@@ -488,29 +494,49 @@ async function makeRequestWith402Handling(url, method, body, secretKeyHex, rpcUr
488
494
  return data;
489
495
  }
490
496
  async function createSandboxPayment(apiUrl, rpcUrl, amount, currency, recipient, senderAddress, secretKeyHex, lineItems) {
491
- console.log("[MoneyMQ] Creating sandbox payment...", { amount, currency, recipient, senderAddress });
492
- const description = lineItems && lineItems.length > 0 ? `Purchase - ${lineItems.map((item) => item.product.name).join(", ")}` : "Payment";
493
- const paymentIntent = await makeRequestWith402Handling(
494
- `${apiUrl}/catalog/v1/payment_intents`,
497
+ console.log("[MoneyMQ] Creating checkout session...", {
498
+ amount,
499
+ currency,
500
+ recipient,
501
+ senderAddress
502
+ });
503
+ const checkoutLineItems = lineItems?.map((item) => ({
504
+ price_data: {
505
+ currency: item.price.currency.toLowerCase(),
506
+ unit_amount: item.price.unit_amount,
507
+ product_data: {
508
+ name: item.product.name,
509
+ description: item.product.description || void 0,
510
+ metadata: {
511
+ product_id: item.product.id
512
+ }
513
+ }
514
+ },
515
+ quantity: item.quantity
516
+ })) || [];
517
+ const checkoutSession = await makeRequestWith402Handling(
518
+ `${apiUrl}/catalog/v1/checkout/sessions`,
495
519
  "POST",
496
520
  {
497
- amount: Math.round(amount * 100),
498
- // Convert to cents (Stripe-style)
499
- currency: currency.toLowerCase(),
521
+ line_items: checkoutLineItems,
500
522
  customer: senderAddress,
501
- description,
502
523
  metadata: {
503
524
  sender_address: senderAddress,
504
525
  recipient_address: recipient
505
- }
526
+ },
527
+ mode: "payment"
506
528
  },
507
529
  secretKeyHex,
508
- rpcUrl
530
+ rpcUrl,
531
+ {},
532
+ true
533
+ // useJson
509
534
  );
510
- console.log("[MoneyMQ] Payment intent created:", paymentIntent);
511
- console.log("[MoneyMQ] Confirming payment intent:", paymentIntent.id);
535
+ console.log("[MoneyMQ] Checkout session created:", checkoutSession);
536
+ const paymentIntentId = checkoutSession.payment_intent;
537
+ console.log("[MoneyMQ] Confirming payment intent:", paymentIntentId);
512
538
  const confirmedIntent = await makeRequestWith402Handling(
513
- `${apiUrl}/catalog/v1/payment_intents/${paymentIntent.id}/confirm`,
539
+ `${apiUrl}/catalog/v1/payment_intents/${paymentIntentId}/confirm`,
514
540
  "POST",
515
541
  {},
516
542
  secretKeyHex,
@@ -519,6 +545,39 @@ async function createSandboxPayment(apiUrl, rpcUrl, amount, currency, recipient,
519
545
  console.log("[MoneyMQ] Payment intent confirmed:", confirmedIntent);
520
546
  return confirmedIntent.id;
521
547
  }
548
+ function waitForSettlementEvent(apiUrl, paymentIntentId, timeoutMs = 3e4) {
549
+ return new Promise((resolve, reject) => {
550
+ console.log("[MoneyMQ] Waiting for settlement event for intent:", paymentIntentId);
551
+ const stream = new EventStream(apiUrl, { last: 5 });
552
+ let settled = false;
553
+ const cleanup = () => {
554
+ if (!settled) {
555
+ stream.disconnect();
556
+ }
557
+ };
558
+ const timeout = setTimeout(() => {
559
+ cleanup();
560
+ reject(new Error("Settlement event timeout"));
561
+ }, timeoutMs);
562
+ stream.on("payment", (event) => {
563
+ console.log("[MoneyMQ] Received payment event:", event.type);
564
+ if (isPaymentSettlementSucceeded(event)) {
565
+ const { payment_flow } = event.data;
566
+ if (payment_flow.type === "checkout" && payment_flow.intent_id === paymentIntentId) {
567
+ console.log("[MoneyMQ] Settlement event matched for intent:", paymentIntentId);
568
+ settled = true;
569
+ clearTimeout(timeout);
570
+ stream.disconnect();
571
+ resolve(event);
572
+ }
573
+ }
574
+ });
575
+ stream.on("error", (error) => {
576
+ console.error("[MoneyMQ] Stream error:", error);
577
+ });
578
+ stream.connect();
579
+ });
580
+ }
522
581
  var truncateAddress = (address) => {
523
582
  if (address.length <= 12) return address;
524
583
  return `${address.slice(0, 4)}...${address.slice(-4)}`;
@@ -542,14 +601,25 @@ function CheckoutModal({
542
601
  const [showDebug, setShowDebug] = useState4(false);
543
602
  const [accountBalance, setAccountBalance] = useState4(null);
544
603
  const [selectedWallet, setSelectedWallet] = useState4(null);
545
- const [selectedPaymentMethod, setSelectedPaymentMethod] = useState4(null);
546
- const { publicKey, connected, disconnect, wallets, select, wallet: connectedWallet } = useWallet2();
604
+ const [selectedPaymentMethod, setSelectedPaymentMethod] = useState4(
605
+ null
606
+ );
607
+ const {
608
+ publicKey,
609
+ connected,
610
+ disconnect,
611
+ wallets,
612
+ select,
613
+ wallet: connectedWallet
614
+ } = useWallet2();
547
615
  const branding = useBranding();
548
616
  const { isSandboxMode, sandboxAccounts } = useSandbox();
549
617
  const client = useMoneyMQ();
550
618
  const lottieRef = useRef(null);
551
619
  const [shouldRender, setShouldRender] = useState4(false);
552
- const [animationPhase, setAnimationPhase] = useState4("closed");
620
+ const [animationPhase, setAnimationPhase] = useState4(
621
+ "closed"
622
+ );
553
623
  useEffect3(() => {
554
624
  if (visible && !shouldRender) {
555
625
  setShouldRender(true);
@@ -643,7 +713,9 @@ function CheckoutModal({
643
713
  try {
644
714
  const configResponse = await fetch(`${apiUrl}/config`);
645
715
  const config = await configResponse.json();
646
- const rpcUrl = normalizeRpcUrl2(config.x402?.validator?.rpcUrl || "http://localhost:8899");
716
+ const rpcUrl = normalizeRpcUrl2(
717
+ config.x402?.validator?.rpcUrl || "http://localhost:8899"
718
+ );
647
719
  const response = await fetch(rpcUrl, {
648
720
  method: "POST",
649
721
  headers: { "Content-Type": "application/json" },
@@ -703,7 +775,7 @@ function CheckoutModal({
703
775
  } catch {
704
776
  console.log("[MoneyMQ] Using default RPC URL");
705
777
  }
706
- const paymentId = await createSandboxPayment(
778
+ const paymentIntentId = await createSandboxPayment(
707
779
  apiUrl,
708
780
  rpcUrl,
709
781
  amount,
@@ -713,8 +785,11 @@ function CheckoutModal({
713
785
  secretKeyHex,
714
786
  lineItems
715
787
  );
788
+ console.log("[MoneyMQ] Payment confirmed, waiting for settlement event...");
789
+ const settlementEvent = await waitForSettlementEvent(apiUrl, paymentIntentId);
790
+ const signature2 = settlementEvent.data.transaction_signature || paymentIntentId;
716
791
  setIsSending(false);
717
- onSuccess?.(paymentId);
792
+ onSuccess?.(signature2);
718
793
  onClose();
719
794
  return;
720
795
  }
@@ -759,7 +834,18 @@ function CheckoutModal({
759
834
  setIsSending(false);
760
835
  onError?.(err instanceof Error ? err : new Error(String(err)));
761
836
  }
762
- }, [publicKey, recipient, amount, currency, onSuccess, onError, onClose, selectedPaymentMethod, client.config.endpoint, lineItems]);
837
+ }, [
838
+ publicKey,
839
+ recipient,
840
+ amount,
841
+ currency,
842
+ onSuccess,
843
+ onError,
844
+ onClose,
845
+ selectedPaymentMethod,
846
+ client.config.endpoint,
847
+ lineItems
848
+ ]);
763
849
  const canPay = (connected && publicKey || selectedPaymentMethod?.type === "sandbox_account") && recipient && !isSending;
764
850
  useEffect3(() => {
765
851
  if (!canPay || !visible) return;
@@ -770,21 +856,110 @@ function CheckoutModal({
770
856
  return () => clearInterval(interval);
771
857
  }, [canPay, visible]);
772
858
  if (!shouldRender) return null;
773
- const WalletIcon = () => /* @__PURE__ */ jsxs3("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
774
- /* @__PURE__ */ jsx4("path", { d: "M21 12V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h14a2 2 0 002-2v-5z" }),
775
- /* @__PURE__ */ jsx4("path", { d: "M16 12h.01", strokeWidth: "2", strokeLinecap: "round" })
776
- ] });
777
- const SandboxIcon = () => /* @__PURE__ */ jsx4("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx4("path", { d: "M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 1-6.23.693L5 15.5m14.8-.2a2.25 2.25 0 0 1 .775 2.646l-.972 2.916a2.25 2.25 0 0 1-2.134 1.538H6.532a2.25 2.25 0 0 1-2.135-1.538l-.971-2.916A2.25 2.25 0 0 1 4.2 15.3", strokeLinecap: "round", strokeLinejoin: "round" }) });
778
- const WrenchIcon = () => /* @__PURE__ */ jsx4("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx4("path", { d: "M11.42 15.17L17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z", strokeLinecap: "round", strokeLinejoin: "round" }) });
859
+ const WalletIcon = () => /* @__PURE__ */ jsxs3(
860
+ "svg",
861
+ {
862
+ width: "24",
863
+ height: "24",
864
+ viewBox: "0 0 24 24",
865
+ fill: "none",
866
+ stroke: "currentColor",
867
+ strokeWidth: "1.5",
868
+ children: [
869
+ /* @__PURE__ */ jsx4("path", { d: "M21 12V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h14a2 2 0 002-2v-5z" }),
870
+ /* @__PURE__ */ jsx4("path", { d: "M16 12h.01", strokeWidth: "2", strokeLinecap: "round" })
871
+ ]
872
+ }
873
+ );
874
+ const SandboxIcon = () => /* @__PURE__ */ jsx4(
875
+ "svg",
876
+ {
877
+ width: "24",
878
+ height: "24",
879
+ viewBox: "0 0 24 24",
880
+ fill: "none",
881
+ stroke: "currentColor",
882
+ strokeWidth: "1.5",
883
+ children: /* @__PURE__ */ jsx4(
884
+ "path",
885
+ {
886
+ d: "M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 1-6.23.693L5 15.5m14.8-.2a2.25 2.25 0 0 1 .775 2.646l-.972 2.916a2.25 2.25 0 0 1-2.134 1.538H6.532a2.25 2.25 0 0 1-2.135-1.538l-.971-2.916A2.25 2.25 0 0 1 4.2 15.3",
887
+ strokeLinecap: "round",
888
+ strokeLinejoin: "round"
889
+ }
890
+ )
891
+ }
892
+ );
893
+ const WrenchIcon = () => /* @__PURE__ */ jsx4(
894
+ "svg",
895
+ {
896
+ width: "16",
897
+ height: "16",
898
+ viewBox: "0 0 24 24",
899
+ fill: "none",
900
+ stroke: "currentColor",
901
+ strokeWidth: "1.5",
902
+ children: /* @__PURE__ */ jsx4(
903
+ "path",
904
+ {
905
+ d: "M11.42 15.17L17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z",
906
+ strokeLinecap: "round",
907
+ strokeLinejoin: "round"
908
+ }
909
+ )
910
+ }
911
+ );
779
912
  const MoneyMQLogo = () => /* @__PURE__ */ jsxs3("svg", { width: "80", height: "17", viewBox: "0 0 471 99", fill: "none", children: [
780
913
  /* @__PURE__ */ jsxs3("g", { clipPath: "url(#clip0_524_7)", children: [
781
- /* @__PURE__ */ jsx4("path", { d: "M12.8892 77.1417H0V0.637573H14.3415L40.0291 60.1104L65.8075 0.637573H80.149V77.1417H67.169V25.5014L44.9306 77.2327H35.0368L12.8892 25.5014V77.2327V77.1417Z", fill: "white" }),
782
- /* @__PURE__ */ jsx4("path", { d: "M113.28 77.9614C108.015 77.9614 103.295 76.7774 99.2104 74.5005C95.1257 72.2235 91.8581 68.9448 89.5888 64.7553C87.2289 60.5658 86.1396 55.6476 86.1396 49.9098C86.1396 44.172 87.3196 39.1628 89.7704 34.9733C92.2211 30.7838 95.4888 27.5051 99.6642 25.2281C103.84 22.9512 108.56 21.7673 113.733 21.7673C118.907 21.7673 123.627 22.9512 127.803 25.2281C131.978 27.5051 135.336 30.7838 137.787 34.9733C140.238 39.1628 141.509 44.081 141.509 49.8188C141.509 55.5566 140.238 60.5658 137.787 64.7553C135.246 68.9448 131.887 72.2235 127.621 74.5005C123.355 76.7774 118.635 77.9614 113.37 77.9614H113.28ZM113.189 66.9411C115.73 66.9411 118.181 66.3036 120.45 65.1196C122.72 63.8445 124.626 62.023 126.078 59.4729C127.53 56.9227 128.257 53.735 128.257 49.8188C128.257 45.9025 127.53 42.897 126.169 40.3468C124.807 37.7967 122.992 35.9752 120.723 34.7001C118.453 33.425 116.003 32.8786 113.461 32.8786C110.92 32.8786 108.56 33.5161 106.381 34.7001C104.203 35.9752 102.478 37.7967 101.207 40.3468C99.9365 42.897 99.3011 46.0846 99.3011 50.0009C99.3011 53.9172 99.9365 56.9227 101.117 59.4729C102.387 62.023 104.021 63.8445 106.2 65.1196C108.378 66.3947 110.647 66.9411 113.189 66.9411Z", fill: "white" }),
783
- /* @__PURE__ */ jsx4("path", { d: "M146.41 22.4959H157.484L158.392 27.8694C160.207 25.9568 162.386 24.4995 164.927 23.4066C167.469 22.3137 170.192 21.7673 173.096 21.7673C177.272 21.7673 180.993 22.678 184.079 24.4085C187.166 26.23 189.526 28.7801 191.25 32.241C192.884 35.7019 193.792 39.9825 193.792 45.1739V77.0506H181.356V46.9043C181.356 42.2594 180.449 38.7075 178.633 36.4305C176.818 34.1536 174.095 32.9696 170.373 32.9696C166.652 32.9696 163.747 34.1536 161.75 36.5216C159.753 38.8896 158.846 42.4416 158.846 47.0865V77.1417H146.501V22.4959H146.41Z", fill: "white" }),
784
- /* @__PURE__ */ jsx4("path", { d: "M225.107 77.9614C219.661 77.9614 214.85 76.7774 210.765 74.3183C206.681 71.8592 203.504 68.5805 201.144 64.2999C198.875 60.0193 197.695 55.0101 197.695 49.4545C197.695 44.172 198.784 39.4361 201.053 35.2466C203.322 31.057 206.409 27.7783 210.402 25.4103C214.396 23.0423 218.935 21.7673 223.927 21.7673C228.919 21.7673 233.73 22.8602 237.633 25.1371C241.536 27.414 244.622 30.5106 246.892 34.609C249.161 38.6164 250.25 43.3523 250.25 48.6348C250.25 49.5455 250.25 50.4563 250.068 51.4581C249.978 52.46 249.796 53.4618 249.705 54.5547H211.038C211.31 57.1959 212.127 59.3818 213.398 61.2033C214.669 63.0248 216.302 64.4821 218.209 65.4839C220.205 66.4857 222.475 67.0322 225.107 67.0322C228.102 67.0322 230.825 66.3947 233.185 65.1196C235.636 63.8445 237.27 62.2051 238.268 60.2925L249.07 63.9356C246.892 68.3073 243.715 71.7682 239.448 74.2272C235.182 76.6863 230.372 77.9614 225.016 77.9614H225.107ZM236.816 44.5363C236.816 42.2594 236.272 40.2557 235.092 38.4342C233.912 36.6127 232.368 35.1555 230.553 34.1536C228.647 33.0607 226.559 32.6053 224.199 32.6053C222.112 32.6053 220.115 33.1518 218.39 34.1536C216.575 35.1555 215.122 36.6127 213.852 38.3431C212.581 40.1647 211.764 42.2594 211.31 44.6274H236.816V44.5363Z", fill: "white" }),
785
- /* @__PURE__ */ jsx4("path", { d: "M291.368 22.4958H304.439L272.398 99H260.235L270.038 75.5022L248.707 22.4958H262.413L276.754 61.2033L291.368 22.4958Z", fill: "white" }),
786
- /* @__PURE__ */ jsx4("path", { d: "M320.687 77.1417H307.797V0.637573H322.139L347.827 60.1104L373.605 0.637573H387.946V77.1417H374.966V25.5014L352.728 77.2327H342.834L320.596 25.5014V77.2327L320.687 77.1417Z", fill: "white" }),
787
- /* @__PURE__ */ jsx4("path", { d: "M432.332 77.9614C426.977 77.9614 421.894 77.0506 417.174 75.138C412.454 73.2254 408.369 70.5842 404.829 67.1233C401.289 63.6624 398.566 59.5639 396.569 54.7369C394.573 50.0009 393.574 44.7185 393.574 38.9807C393.574 33.2429 394.573 28.0515 396.569 23.3155C398.566 18.5796 401.289 14.3901 404.829 10.9292C408.369 7.46826 412.454 4.73597 417.174 2.82337C421.894 0.910764 426.886 0 432.332 0C437.779 0 442.771 0.910764 447.4 2.82337C452.029 4.73597 456.205 7.37719 459.745 10.9292C463.285 14.3901 466.008 18.5796 468.005 23.3155C470.002 28.0515 471 33.3339 471 38.9807C471 44.6274 470.002 50.0009 468.095 54.7369C466.098 59.4729 463.375 63.6624 459.835 67.1233C456.295 70.5842 452.12 73.2254 447.491 75.138C442.862 77.0506 437.779 77.9614 432.423 77.9614H432.332ZM432.242 66.9411C437.143 66.9411 441.591 65.7571 445.403 63.4802C449.215 61.2033 452.302 57.9246 454.571 53.735C456.84 49.5455 457.929 44.6274 457.929 38.8896C457.929 33.1518 456.84 28.1426 454.571 24.0442C452.302 19.9457 449.306 16.667 445.403 14.3901C441.591 12.1132 437.143 10.9292 432.242 10.9292C427.34 10.9292 422.892 12.1132 419.08 14.3901C415.268 16.667 412.182 19.9457 410.003 24.0442C407.825 28.1426 406.736 33.1518 406.736 38.8896C406.736 44.6274 407.825 49.5455 410.094 53.735C412.273 57.9246 415.359 61.2033 419.171 63.4802C422.983 65.7571 427.34 66.9411 432.332 66.9411H432.242ZM426.251 55.0101H438.868V87.9798H426.251V55.0101Z", fill: "white" })
914
+ /* @__PURE__ */ jsx4(
915
+ "path",
916
+ {
917
+ d: "M12.8892 77.1417H0V0.637573H14.3415L40.0291 60.1104L65.8075 0.637573H80.149V77.1417H67.169V25.5014L44.9306 77.2327H35.0368L12.8892 25.5014V77.2327V77.1417Z",
918
+ fill: "white"
919
+ }
920
+ ),
921
+ /* @__PURE__ */ jsx4(
922
+ "path",
923
+ {
924
+ d: "M113.28 77.9614C108.015 77.9614 103.295 76.7774 99.2104 74.5005C95.1257 72.2235 91.8581 68.9448 89.5888 64.7553C87.2289 60.5658 86.1396 55.6476 86.1396 49.9098C86.1396 44.172 87.3196 39.1628 89.7704 34.9733C92.2211 30.7838 95.4888 27.5051 99.6642 25.2281C103.84 22.9512 108.56 21.7673 113.733 21.7673C118.907 21.7673 123.627 22.9512 127.803 25.2281C131.978 27.5051 135.336 30.7838 137.787 34.9733C140.238 39.1628 141.509 44.081 141.509 49.8188C141.509 55.5566 140.238 60.5658 137.787 64.7553C135.246 68.9448 131.887 72.2235 127.621 74.5005C123.355 76.7774 118.635 77.9614 113.37 77.9614H113.28ZM113.189 66.9411C115.73 66.9411 118.181 66.3036 120.45 65.1196C122.72 63.8445 124.626 62.023 126.078 59.4729C127.53 56.9227 128.257 53.735 128.257 49.8188C128.257 45.9025 127.53 42.897 126.169 40.3468C124.807 37.7967 122.992 35.9752 120.723 34.7001C118.453 33.425 116.003 32.8786 113.461 32.8786C110.92 32.8786 108.56 33.5161 106.381 34.7001C104.203 35.9752 102.478 37.7967 101.207 40.3468C99.9365 42.897 99.3011 46.0846 99.3011 50.0009C99.3011 53.9172 99.9365 56.9227 101.117 59.4729C102.387 62.023 104.021 63.8445 106.2 65.1196C108.378 66.3947 110.647 66.9411 113.189 66.9411Z",
925
+ fill: "white"
926
+ }
927
+ ),
928
+ /* @__PURE__ */ jsx4(
929
+ "path",
930
+ {
931
+ d: "M146.41 22.4959H157.484L158.392 27.8694C160.207 25.9568 162.386 24.4995 164.927 23.4066C167.469 22.3137 170.192 21.7673 173.096 21.7673C177.272 21.7673 180.993 22.678 184.079 24.4085C187.166 26.23 189.526 28.7801 191.25 32.241C192.884 35.7019 193.792 39.9825 193.792 45.1739V77.0506H181.356V46.9043C181.356 42.2594 180.449 38.7075 178.633 36.4305C176.818 34.1536 174.095 32.9696 170.373 32.9696C166.652 32.9696 163.747 34.1536 161.75 36.5216C159.753 38.8896 158.846 42.4416 158.846 47.0865V77.1417H146.501V22.4959H146.41Z",
932
+ fill: "white"
933
+ }
934
+ ),
935
+ /* @__PURE__ */ jsx4(
936
+ "path",
937
+ {
938
+ d: "M225.107 77.9614C219.661 77.9614 214.85 76.7774 210.765 74.3183C206.681 71.8592 203.504 68.5805 201.144 64.2999C198.875 60.0193 197.695 55.0101 197.695 49.4545C197.695 44.172 198.784 39.4361 201.053 35.2466C203.322 31.057 206.409 27.7783 210.402 25.4103C214.396 23.0423 218.935 21.7673 223.927 21.7673C228.919 21.7673 233.73 22.8602 237.633 25.1371C241.536 27.414 244.622 30.5106 246.892 34.609C249.161 38.6164 250.25 43.3523 250.25 48.6348C250.25 49.5455 250.25 50.4563 250.068 51.4581C249.978 52.46 249.796 53.4618 249.705 54.5547H211.038C211.31 57.1959 212.127 59.3818 213.398 61.2033C214.669 63.0248 216.302 64.4821 218.209 65.4839C220.205 66.4857 222.475 67.0322 225.107 67.0322C228.102 67.0322 230.825 66.3947 233.185 65.1196C235.636 63.8445 237.27 62.2051 238.268 60.2925L249.07 63.9356C246.892 68.3073 243.715 71.7682 239.448 74.2272C235.182 76.6863 230.372 77.9614 225.016 77.9614H225.107ZM236.816 44.5363C236.816 42.2594 236.272 40.2557 235.092 38.4342C233.912 36.6127 232.368 35.1555 230.553 34.1536C228.647 33.0607 226.559 32.6053 224.199 32.6053C222.112 32.6053 220.115 33.1518 218.39 34.1536C216.575 35.1555 215.122 36.6127 213.852 38.3431C212.581 40.1647 211.764 42.2594 211.31 44.6274H236.816V44.5363Z",
939
+ fill: "white"
940
+ }
941
+ ),
942
+ /* @__PURE__ */ jsx4(
943
+ "path",
944
+ {
945
+ d: "M291.368 22.4958H304.439L272.398 99H260.235L270.038 75.5022L248.707 22.4958H262.413L276.754 61.2033L291.368 22.4958Z",
946
+ fill: "white"
947
+ }
948
+ ),
949
+ /* @__PURE__ */ jsx4(
950
+ "path",
951
+ {
952
+ d: "M320.687 77.1417H307.797V0.637573H322.139L347.827 60.1104L373.605 0.637573H387.946V77.1417H374.966V25.5014L352.728 77.2327H342.834L320.596 25.5014V77.2327L320.687 77.1417Z",
953
+ fill: "white"
954
+ }
955
+ ),
956
+ /* @__PURE__ */ jsx4(
957
+ "path",
958
+ {
959
+ d: "M432.332 77.9614C426.977 77.9614 421.894 77.0506 417.174 75.138C412.454 73.2254 408.369 70.5842 404.829 67.1233C401.289 63.6624 398.566 59.5639 396.569 54.7369C394.573 50.0009 393.574 44.7185 393.574 38.9807C393.574 33.2429 394.573 28.0515 396.569 23.3155C398.566 18.5796 401.289 14.3901 404.829 10.9292C408.369 7.46826 412.454 4.73597 417.174 2.82337C421.894 0.910764 426.886 0 432.332 0C437.779 0 442.771 0.910764 447.4 2.82337C452.029 4.73597 456.205 7.37719 459.745 10.9292C463.285 14.3901 466.008 18.5796 468.005 23.3155C470.002 28.0515 471 33.3339 471 38.9807C471 44.6274 470.002 50.0009 468.095 54.7369C466.098 59.4729 463.375 63.6624 459.835 67.1233C456.295 70.5842 452.12 73.2254 447.491 75.138C442.862 77.0506 437.779 77.9614 432.423 77.9614H432.332ZM432.242 66.9411C437.143 66.9411 441.591 65.7571 445.403 63.4802C449.215 61.2033 452.302 57.9246 454.571 53.735C456.84 49.5455 457.929 44.6274 457.929 38.8896C457.929 33.1518 456.84 28.1426 454.571 24.0442C452.302 19.9457 449.306 16.667 445.403 14.3901C441.591 12.1132 437.143 10.9292 432.242 10.9292C427.34 10.9292 422.892 12.1132 419.08 14.3901C415.268 16.667 412.182 19.9457 410.003 24.0442C407.825 28.1426 406.736 33.1518 406.736 38.8896C406.736 44.6274 407.825 49.5455 410.094 53.735C412.273 57.9246 415.359 61.2033 419.171 63.4802C422.983 65.7571 427.34 66.9411 432.332 66.9411H432.242ZM426.251 55.0101H438.868V87.9798H426.251V55.0101Z",
960
+ fill: "white"
961
+ }
962
+ )
788
963
  ] }),
789
964
  /* @__PURE__ */ jsx4("defs", { children: /* @__PURE__ */ jsx4("clipPath", { id: "clip0_524_7", children: /* @__PURE__ */ jsx4("rect", { width: "471", height: "99", fill: "white" }) }) })
790
965
  ] });
@@ -862,7 +1037,19 @@ function CheckoutModal({
862
1037
  style: { height: "24px", width: "auto", filter: "invert(1)" }
863
1038
  }
864
1039
  ) : /* @__PURE__ */ jsx4(MoneyMQLogo, {}),
865
- isSandboxMode && /* @__PURE__ */ jsx4("span", { style: { fontSize: "0.75rem", fontWeight: 600, color: "#ff9f0a", position: "relative", top: "-1px" }, children: "{ sandbox }" })
1040
+ isSandboxMode && /* @__PURE__ */ jsx4(
1041
+ "span",
1042
+ {
1043
+ style: {
1044
+ fontSize: "0.75rem",
1045
+ fontWeight: 600,
1046
+ color: "#ff9f0a",
1047
+ position: "relative",
1048
+ top: "-1px"
1049
+ },
1050
+ children: "{ sandbox }"
1051
+ }
1052
+ )
866
1053
  ] }),
867
1054
  /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
868
1055
  debug && /* @__PURE__ */ jsx4(
@@ -943,31 +1130,53 @@ function CheckoutModal({
943
1130
  }
944
1131
  ),
945
1132
  /* @__PURE__ */ jsxs3("div", { style: { flex: 1, minWidth: 0 }, children: [
946
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem", marginBottom: "0.125rem" }, children: [
947
- /* @__PURE__ */ jsxs3("span", { style: { fontSize: "0.75rem", color: "#8e8e93" }, children: [
948
- "From ",
949
- truncateAddress(currentSelection.address)
950
- ] }),
951
- /* @__PURE__ */ jsx4(
952
- "button",
953
- {
954
- onClick: () => copyToClipboard(currentSelection.address, "sender"),
955
- style: {
956
- padding: 0,
957
- background: "none",
958
- border: "none",
959
- cursor: "pointer",
960
- color: copiedSender ? "#30d158" : "#8e8e93",
961
- display: "flex",
962
- alignItems: "center"
963
- },
964
- children: /* @__PURE__ */ jsxs3("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
965
- /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
966
- /* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
967
- ] })
968
- }
969
- )
970
- ] }),
1133
+ /* @__PURE__ */ jsxs3(
1134
+ "div",
1135
+ {
1136
+ style: {
1137
+ display: "flex",
1138
+ alignItems: "center",
1139
+ gap: "0.375rem",
1140
+ marginBottom: "0.125rem"
1141
+ },
1142
+ children: [
1143
+ /* @__PURE__ */ jsxs3("span", { style: { fontSize: "0.75rem", color: "#8e8e93" }, children: [
1144
+ "From ",
1145
+ truncateAddress(currentSelection.address)
1146
+ ] }),
1147
+ /* @__PURE__ */ jsx4(
1148
+ "button",
1149
+ {
1150
+ onClick: () => copyToClipboard(currentSelection.address, "sender"),
1151
+ style: {
1152
+ padding: 0,
1153
+ background: "none",
1154
+ border: "none",
1155
+ cursor: "pointer",
1156
+ color: copiedSender ? "#30d158" : "#8e8e93",
1157
+ display: "flex",
1158
+ alignItems: "center"
1159
+ },
1160
+ children: /* @__PURE__ */ jsxs3(
1161
+ "svg",
1162
+ {
1163
+ width: "12",
1164
+ height: "12",
1165
+ viewBox: "0 0 24 24",
1166
+ fill: "none",
1167
+ stroke: "currentColor",
1168
+ strokeWidth: "2",
1169
+ children: [
1170
+ /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1171
+ /* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
1172
+ ]
1173
+ }
1174
+ )
1175
+ }
1176
+ )
1177
+ ]
1178
+ }
1179
+ ),
971
1180
  /* @__PURE__ */ jsx4(
972
1181
  "span",
973
1182
  {
@@ -1042,7 +1251,13 @@ function CheckoutModal({
1042
1251
  }
1043
1252
  ),
1044
1253
  /* @__PURE__ */ jsxs3("div", { style: { flex: 1, minWidth: 0 }, children: [
1045
- /* @__PURE__ */ jsx4("div", { style: { fontSize: "0.75rem", color: "#8e8e93", marginBottom: "0.125rem" }, children: "From" }),
1254
+ /* @__PURE__ */ jsx4(
1255
+ "div",
1256
+ {
1257
+ style: { fontSize: "0.75rem", color: "#8e8e93", marginBottom: "0.125rem" },
1258
+ children: "From"
1259
+ }
1260
+ ),
1046
1261
  /* @__PURE__ */ jsx4(
1047
1262
  "span",
1048
1263
  {
@@ -1063,7 +1278,14 @@ function CheckoutModal({
1063
1278
  viewBox: "0 0 16 16",
1064
1279
  fill: "#8e8e93",
1065
1280
  style: { flexShrink: 0 },
1066
- children: /* @__PURE__ */ jsx4("path", { fillRule: "evenodd", d: "M5.22 10.22a.75.75 0 0 1 1.06 0L8 11.94l1.72-1.72a.75.75 0 1 1 1.06 1.06l-2.25 2.25a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 0 1 0-1.06ZM10.78 5.78a.75.75 0 0 1-1.06 0L8 4.06 6.28 5.78a.75.75 0 0 1-1.06-1.06l2.25-2.25a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1 0 1.06Z", clipRule: "evenodd" })
1281
+ children: /* @__PURE__ */ jsx4(
1282
+ "path",
1283
+ {
1284
+ fillRule: "evenodd",
1285
+ d: "M5.22 10.22a.75.75 0 0 1 1.06 0L8 11.94l1.72-1.72a.75.75 0 1 1 1.06 1.06l-2.25 2.25a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 0 1 0-1.06ZM10.78 5.78a.75.75 0 0 1-1.06 0L8 4.06 6.28 5.78a.75.75 0 0 1-1.06-1.06l2.25-2.25a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1 0 1.06Z",
1286
+ clipRule: "evenodd"
1287
+ }
1288
+ )
1067
1289
  }
1068
1290
  )
1069
1291
  ]
@@ -1125,42 +1347,64 @@ function CheckoutModal({
1125
1347
  }
1126
1348
  ),
1127
1349
  /* @__PURE__ */ jsxs3("div", { style: { flex: 1, minWidth: 0 }, children: [
1128
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem", marginBottom: "0.125rem" }, children: [
1129
- /* @__PURE__ */ jsxs3("span", { style: { fontSize: "0.75rem", color: "#8e8e93" }, children: [
1130
- "From ",
1131
- truncateAddress(account.address)
1132
- ] }),
1133
- /* @__PURE__ */ jsx4(
1134
- "span",
1135
- {
1136
- role: "button",
1137
- tabIndex: 0,
1138
- onClick: (e) => {
1139
- e.stopPropagation();
1140
- navigator.clipboard.writeText(account.address);
1141
- },
1142
- onKeyDown: (e) => {
1143
- if (e.key === "Enter" || e.key === " ") {
1144
- e.stopPropagation();
1145
- navigator.clipboard.writeText(account.address);
1350
+ /* @__PURE__ */ jsxs3(
1351
+ "div",
1352
+ {
1353
+ style: {
1354
+ display: "flex",
1355
+ alignItems: "center",
1356
+ gap: "0.375rem",
1357
+ marginBottom: "0.125rem"
1358
+ },
1359
+ children: [
1360
+ /* @__PURE__ */ jsxs3("span", { style: { fontSize: "0.75rem", color: "#8e8e93" }, children: [
1361
+ "From ",
1362
+ truncateAddress(account.address)
1363
+ ] }),
1364
+ /* @__PURE__ */ jsx4(
1365
+ "span",
1366
+ {
1367
+ role: "button",
1368
+ tabIndex: 0,
1369
+ onClick: (e) => {
1370
+ e.stopPropagation();
1371
+ navigator.clipboard.writeText(account.address);
1372
+ },
1373
+ onKeyDown: (e) => {
1374
+ if (e.key === "Enter" || e.key === " ") {
1375
+ e.stopPropagation();
1376
+ navigator.clipboard.writeText(account.address);
1377
+ }
1378
+ },
1379
+ style: {
1380
+ padding: 0,
1381
+ background: "none",
1382
+ border: "none",
1383
+ cursor: "pointer",
1384
+ color: "#8e8e93",
1385
+ display: "flex",
1386
+ alignItems: "center"
1387
+ },
1388
+ children: /* @__PURE__ */ jsxs3(
1389
+ "svg",
1390
+ {
1391
+ width: "12",
1392
+ height: "12",
1393
+ viewBox: "0 0 24 24",
1394
+ fill: "none",
1395
+ stroke: "currentColor",
1396
+ strokeWidth: "2",
1397
+ children: [
1398
+ /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1399
+ /* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
1400
+ ]
1401
+ }
1402
+ )
1146
1403
  }
1147
- },
1148
- style: {
1149
- padding: 0,
1150
- background: "none",
1151
- border: "none",
1152
- cursor: "pointer",
1153
- color: "#8e8e93",
1154
- display: "flex",
1155
- alignItems: "center"
1156
- },
1157
- children: /* @__PURE__ */ jsxs3("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1158
- /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1159
- /* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
1160
- ] })
1161
- }
1162
- )
1163
- ] }),
1404
+ )
1405
+ ]
1406
+ }
1407
+ ),
1164
1408
  /* @__PURE__ */ jsx4(
1165
1409
  "span",
1166
1410
  {
@@ -1193,7 +1437,12 @@ function CheckoutModal({
1193
1437
  ]
1194
1438
  }
1195
1439
  ) }, account.id)),
1196
- availableWallets.length > 0 && /* @__PURE__ */ jsx4("div", { style: { height: "1px", backgroundColor: "#48484a", margin: "0.25rem 0" } })
1440
+ availableWallets.length > 0 && /* @__PURE__ */ jsx4(
1441
+ "div",
1442
+ {
1443
+ style: { height: "1px", backgroundColor: "#48484a", margin: "0.25rem 0" }
1444
+ }
1445
+ )
1197
1446
  ] }),
1198
1447
  availableWallets.length > 0 ? availableWallets.map((wallet) => /* @__PURE__ */ jsx4(MenuItem, { children: ({ focus }) => /* @__PURE__ */ jsxs3(
1199
1448
  "button",
@@ -1242,7 +1491,17 @@ function CheckoutModal({
1242
1491
  }
1243
1492
  ),
1244
1493
  /* @__PURE__ */ jsxs3("div", { style: { flex: 1, minWidth: 0 }, children: [
1245
- /* @__PURE__ */ jsx4("div", { style: { fontSize: "0.75rem", color: "#8e8e93", marginBottom: "0.125rem" }, children: "Browser Extension" }),
1494
+ /* @__PURE__ */ jsx4(
1495
+ "div",
1496
+ {
1497
+ style: {
1498
+ fontSize: "0.75rem",
1499
+ color: "#8e8e93",
1500
+ marginBottom: "0.125rem"
1501
+ },
1502
+ children: "Browser Extension"
1503
+ }
1504
+ ),
1246
1505
  /* @__PURE__ */ jsx4(
1247
1506
  "span",
1248
1507
  {
@@ -1312,14 +1571,21 @@ function CheckoutModal({
1312
1571
  item.quantity > 1 && /* @__PURE__ */ jsxs3("div", { style: { fontSize: "0.75rem", color: "#8e8e93" }, children: [
1313
1572
  "Qty: ",
1314
1573
  item.quantity,
1315
- " \xD7 ",
1316
- (item.price.unit_amount / 100).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 }),
1574
+ " \xD7",
1575
+ " ",
1576
+ (item.price.unit_amount / 100).toLocaleString(void 0, {
1577
+ minimumFractionDigits: 2,
1578
+ maximumFractionDigits: 2
1579
+ }),
1317
1580
  " ",
1318
1581
  item.price.currency.toUpperCase()
1319
1582
  ] })
1320
1583
  ] }),
1321
1584
  /* @__PURE__ */ jsxs3("div", { style: { fontSize: "0.875rem", color: "#fff", fontWeight: 500 }, children: [
1322
- item.subtotal.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 }),
1585
+ item.subtotal.toLocaleString(void 0, {
1586
+ minimumFractionDigits: 2,
1587
+ maximumFractionDigits: 2
1588
+ }),
1323
1589
  " ",
1324
1590
  item.price.currency.toUpperCase()
1325
1591
  ] })
@@ -1328,38 +1594,47 @@ function CheckoutModal({
1328
1594
  item.product.id + "-" + index
1329
1595
  )) }),
1330
1596
  /* @__PURE__ */ jsx4("div", { style: { fontSize: "0.875rem", color: "#8e8e93", marginBottom: "0.25rem" }, children: "Total" }),
1331
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
1332
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "baseline", gap: "0.375rem" }, children: [
1333
- /* @__PURE__ */ jsx4("span", { style: { fontSize: "2rem", fontWeight: 600, color: "#fff" }, children: amount.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }),
1334
- /* @__PURE__ */ jsx4("span", { style: { fontSize: "1rem", fontWeight: 500, color: "#8e8e93" }, children: currency })
1335
- ] }),
1336
- /* @__PURE__ */ jsx4(
1337
- "button",
1338
- {
1339
- onClick: () => setShowDetails(!showDetails),
1340
- style: {
1341
- width: "22px",
1342
- height: "22px",
1343
- borderRadius: "50%",
1344
- border: "1.5px solid #8e8e93",
1345
- background: "none",
1346
- color: "#8e8e93",
1347
- fontSize: "0.8125rem",
1348
- fontWeight: 600,
1349
- fontStyle: "italic",
1350
- fontFamily: "Georgia, serif",
1351
- cursor: "pointer",
1352
- display: "flex",
1353
- alignItems: "center",
1354
- justifyContent: "center",
1355
- padding: 0,
1356
- transition: "all 150ms"
1357
- },
1358
- title: "Show payment details",
1359
- children: "i"
1360
- }
1361
- )
1362
- ] }),
1597
+ /* @__PURE__ */ jsxs3(
1598
+ "div",
1599
+ {
1600
+ style: { display: "flex", alignItems: "center", justifyContent: "space-between" },
1601
+ children: [
1602
+ /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "baseline", gap: "0.375rem" }, children: [
1603
+ /* @__PURE__ */ jsx4("span", { style: { fontSize: "2rem", fontWeight: 600, color: "#fff" }, children: amount.toLocaleString(void 0, {
1604
+ minimumFractionDigits: 2,
1605
+ maximumFractionDigits: 2
1606
+ }) }),
1607
+ /* @__PURE__ */ jsx4("span", { style: { fontSize: "1rem", fontWeight: 500, color: "#8e8e93" }, children: currency })
1608
+ ] }),
1609
+ /* @__PURE__ */ jsx4(
1610
+ "button",
1611
+ {
1612
+ onClick: () => setShowDetails(!showDetails),
1613
+ style: {
1614
+ width: "22px",
1615
+ height: "22px",
1616
+ borderRadius: "50%",
1617
+ border: "1.5px solid #8e8e93",
1618
+ background: "none",
1619
+ color: "#8e8e93",
1620
+ fontSize: "0.8125rem",
1621
+ fontWeight: 600,
1622
+ fontStyle: "italic",
1623
+ fontFamily: "Georgia, serif",
1624
+ cursor: "pointer",
1625
+ display: "flex",
1626
+ alignItems: "center",
1627
+ justifyContent: "center",
1628
+ padding: 0,
1629
+ transition: "all 150ms"
1630
+ },
1631
+ title: "Show payment details",
1632
+ children: "i"
1633
+ }
1634
+ )
1635
+ ]
1636
+ }
1637
+ ),
1363
1638
  showDetails && /* @__PURE__ */ jsx4(
1364
1639
  "div",
1365
1640
  {
@@ -1370,41 +1645,62 @@ function CheckoutModal({
1370
1645
  borderRadius: "0.5rem",
1371
1646
  fontSize: "0.8125rem"
1372
1647
  },
1373
- children: /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
1374
- /* @__PURE__ */ jsx4("span", { style: { color: "#8e8e93" }, children: "Recipient" }),
1375
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
1376
- /* @__PURE__ */ jsx4(
1377
- "span",
1378
- {
1379
- style: {
1380
- color: "#fff",
1381
- fontFamily: "ui-monospace, monospace",
1382
- fontSize: "0.75rem"
1383
- },
1384
- children: truncateAddress(recipient)
1385
- }
1386
- ),
1387
- /* @__PURE__ */ jsx4(
1388
- "button",
1389
- {
1390
- onClick: () => copyToClipboard(recipient, "recipient"),
1391
- style: {
1392
- padding: 0,
1393
- background: "none",
1394
- border: "none",
1395
- cursor: "pointer",
1396
- color: copiedRecipient ? "#30d158" : "#8e8e93",
1397
- display: "flex",
1398
- alignItems: "center"
1399
- },
1400
- children: /* @__PURE__ */ jsxs3("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1401
- /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1402
- /* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
1403
- ] })
1404
- }
1405
- )
1406
- ] })
1407
- ] })
1648
+ children: /* @__PURE__ */ jsxs3(
1649
+ "div",
1650
+ {
1651
+ style: {
1652
+ display: "flex",
1653
+ alignItems: "center",
1654
+ justifyContent: "space-between"
1655
+ },
1656
+ children: [
1657
+ /* @__PURE__ */ jsx4("span", { style: { color: "#8e8e93" }, children: "Recipient" }),
1658
+ /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
1659
+ /* @__PURE__ */ jsx4(
1660
+ "span",
1661
+ {
1662
+ style: {
1663
+ color: "#fff",
1664
+ fontFamily: "ui-monospace, monospace",
1665
+ fontSize: "0.75rem"
1666
+ },
1667
+ children: truncateAddress(recipient)
1668
+ }
1669
+ ),
1670
+ /* @__PURE__ */ jsx4(
1671
+ "button",
1672
+ {
1673
+ onClick: () => copyToClipboard(recipient, "recipient"),
1674
+ style: {
1675
+ padding: 0,
1676
+ background: "none",
1677
+ border: "none",
1678
+ cursor: "pointer",
1679
+ color: copiedRecipient ? "#30d158" : "#8e8e93",
1680
+ display: "flex",
1681
+ alignItems: "center"
1682
+ },
1683
+ children: /* @__PURE__ */ jsxs3(
1684
+ "svg",
1685
+ {
1686
+ width: "12",
1687
+ height: "12",
1688
+ viewBox: "0 0 24 24",
1689
+ fill: "none",
1690
+ stroke: "currentColor",
1691
+ strokeWidth: "2",
1692
+ children: [
1693
+ /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1694
+ /* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
1695
+ ]
1696
+ }
1697
+ )
1698
+ }
1699
+ )
1700
+ ] })
1701
+ ]
1702
+ }
1703
+ )
1408
1704
  }
1409
1705
  ),
1410
1706
  showDebug && /* @__PURE__ */ jsxs3(
@@ -1419,18 +1715,34 @@ function CheckoutModal({
1419
1715
  fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace'
1420
1716
  },
1421
1717
  children: [
1422
- /* @__PURE__ */ jsx4("div", { style: {
1423
- display: "flex",
1424
- alignItems: "center",
1425
- gap: "0.5rem",
1426
- marginBottom: "0.5rem",
1427
- paddingBottom: "0.5rem",
1428
- borderBottom: "1px solid #2c2c2e"
1429
- }, children: /* @__PURE__ */ jsx4("span", { style: { color: "#8e8e93" }, children: "DEBUG" }) }),
1430
- /* @__PURE__ */ jsxs3("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
1431
- /* @__PURE__ */ jsx4("span", { style: { color: "#8e8e93" }, children: "balance" }),
1432
- /* @__PURE__ */ jsx4("span", { style: { color: "#30d158" }, children: accountBalance !== null ? `${accountBalance.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${currency}` : currentSelection ? "..." : "null" })
1433
- ] })
1718
+ /* @__PURE__ */ jsx4(
1719
+ "div",
1720
+ {
1721
+ style: {
1722
+ display: "flex",
1723
+ alignItems: "center",
1724
+ gap: "0.5rem",
1725
+ marginBottom: "0.5rem",
1726
+ paddingBottom: "0.5rem",
1727
+ borderBottom: "1px solid #2c2c2e"
1728
+ },
1729
+ children: /* @__PURE__ */ jsx4("span", { style: { color: "#8e8e93" }, children: "DEBUG" })
1730
+ }
1731
+ ),
1732
+ /* @__PURE__ */ jsxs3(
1733
+ "div",
1734
+ {
1735
+ style: {
1736
+ display: "flex",
1737
+ alignItems: "center",
1738
+ justifyContent: "space-between"
1739
+ },
1740
+ children: [
1741
+ /* @__PURE__ */ jsx4("span", { style: { color: "#8e8e93" }, children: "balance" }),
1742
+ /* @__PURE__ */ jsx4("span", { style: { color: "#30d158" }, children: accountBalance !== null ? `${accountBalance.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${currency}` : currentSelection ? "..." : "null" })
1743
+ ]
1744
+ }
1745
+ )
1434
1746
  ]
1435
1747
  }
1436
1748
  )
@@ -1492,8 +1804,12 @@ function CheckoutModal({
1492
1804
  }
1493
1805
  ),
1494
1806
  /* @__PURE__ */ jsxs3("span", { children: [
1495
- "Pay ",
1496
- amount.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 }),
1807
+ "Pay",
1808
+ " ",
1809
+ amount.toLocaleString(void 0, {
1810
+ minimumFractionDigits: 2,
1811
+ maximumFractionDigits: 2
1812
+ }),
1497
1813
  " ",
1498
1814
  currency
1499
1815
  ] })