@daimo/pay 1.18.3 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/build/index.d.ts +23 -28
  2. package/build/package.json.js +2 -2
  3. package/build/src/assets/chains.js +18 -52
  4. package/build/src/assets/chains.js.map +1 -1
  5. package/build/src/assets/logos.js +76 -2
  6. package/build/src/assets/logos.js.map +1 -1
  7. package/build/src/components/Common/ConnectorList/index.js +21 -20
  8. package/build/src/components/Common/ConnectorList/index.js.map +1 -1
  9. package/build/src/components/Common/Modal/index.js +31 -8
  10. package/build/src/components/Common/Modal/index.js.map +1 -1
  11. package/build/src/components/Common/SelectAnotherMethodButton/index.js +4 -4
  12. package/build/src/components/Common/SelectAnotherMethodButton/index.js.map +1 -1
  13. package/build/src/components/DaimoPayButton/index.js +1 -2
  14. package/build/src/components/DaimoPayButton/index.js.map +1 -1
  15. package/build/src/components/DaimoPayModal/ConnectUsing.js +8 -6
  16. package/build/src/components/DaimoPayModal/ConnectUsing.js.map +1 -1
  17. package/build/src/components/DaimoPayModal/ConnectWithInjector/index.js +13 -9
  18. package/build/src/components/DaimoPayModal/ConnectWithInjector/index.js.map +1 -1
  19. package/build/src/components/DaimoPayModal/ConnectWithQRCode.js +17 -23
  20. package/build/src/components/DaimoPayModal/ConnectWithQRCode.js.map +1 -1
  21. package/build/src/components/DaimoPayModal/index.js +120 -41
  22. package/build/src/components/DaimoPayModal/index.js.map +1 -1
  23. package/build/src/components/Pages/Connectors/index.js +0 -2
  24. package/build/src/components/Pages/Connectors/index.js.map +1 -1
  25. package/build/src/components/Pages/MobileConnectors/index.js +62 -17
  26. package/build/src/components/Pages/MobileConnectors/index.js.map +1 -1
  27. package/build/src/components/Pages/SelectDepositAddressChain/index.js +9 -2
  28. package/build/src/components/Pages/SelectDepositAddressChain/index.js.map +1 -1
  29. package/build/src/components/Pages/SelectExchange/index.js +22 -6
  30. package/build/src/components/Pages/SelectExchange/index.js.map +1 -1
  31. package/build/src/components/Pages/SelectMethod/index.js +107 -26
  32. package/build/src/components/Pages/SelectMethod/index.js.map +1 -1
  33. package/build/src/components/Pages/SelectWalletAmount/index.js +11 -6
  34. package/build/src/components/Pages/SelectWalletAmount/index.js.map +1 -1
  35. package/build/src/components/Pages/WaitingExternal/index.js +88 -3
  36. package/build/src/components/Pages/WaitingExternal/index.js.map +1 -1
  37. package/build/src/constants/limits.js +4 -0
  38. package/build/src/constants/limits.js.map +1 -0
  39. package/build/src/constants/paymentOptions.js +61 -0
  40. package/build/src/constants/paymentOptions.js.map +1 -0
  41. package/build/src/constants/routes.js +0 -1
  42. package/build/src/constants/routes.js.map +1 -1
  43. package/build/src/constants/wallets.js +7 -0
  44. package/build/src/constants/wallets.js.map +1 -0
  45. package/build/src/hooks/useExternalPaymentOptions.js +19 -4
  46. package/build/src/hooks/useExternalPaymentOptions.js.map +1 -1
  47. package/build/src/hooks/usePaymentState.js +41 -6
  48. package/build/src/hooks/usePaymentState.js.map +1 -1
  49. package/build/src/localizations/locales/en-US.js +4 -1
  50. package/build/src/localizations/locales/en-US.js.map +1 -1
  51. package/build/src/localizations/locales/es-ES.js +4 -1
  52. package/build/src/localizations/locales/es-ES.js.map +1 -1
  53. package/build/src/localizations/locales/pt-BR.js +4 -1
  54. package/build/src/localizations/locales/pt-BR.js.map +1 -1
  55. package/build/src/payment/paymentFsm.js.map +1 -1
  56. package/build/src/wallets/useWallets.js +81 -8
  57. package/build/src/wallets/useWallets.js.map +1 -1
  58. package/build/src/wallets/walletConfigs.js +65 -76
  59. package/build/src/wallets/walletConfigs.js.map +1 -1
  60. package/package.json +2 -2
  61. package/build/src/components/Pages/DownloadApp/index.js +0 -35
  62. package/build/src/components/Pages/DownloadApp/index.js.map +0 -1
@@ -1574,6 +1574,79 @@ const SquircleIcon = ({
1574
1574
  const IconComponent = typeof icon === "string" ? /* @__PURE__ */ jsx("img", { src: icon, alt }) : React.createElement(icon);
1575
1575
  return /* @__PURE__ */ jsx("div", { style: { borderRadius: "22.5%", overflow: "hidden" }, children: IconComponent });
1576
1576
  };
1577
+ function createOtherWalletsIcon(wallets) {
1578
+ if (wallets.length === 0) {
1579
+ return /* @__PURE__ */ jsx(OtherWallets, {});
1580
+ }
1581
+ const count = Math.min(wallets.length, 4);
1582
+ const walletsToShow = wallets.slice(0, count);
1583
+ const renderWalletIcon = (wallet) => {
1584
+ const icon = wallet.iconConnector ?? wallet.icon;
1585
+ return typeof icon === "string" ? /* @__PURE__ */ jsx("img", { src: icon, alt: wallet.name || "" }) : icon;
1586
+ };
1587
+ const column = {
1588
+ position: "relative",
1589
+ display: "flex",
1590
+ flexDirection: "column",
1591
+ gap: 2
1592
+ };
1593
+ const row = {
1594
+ position: "relative",
1595
+ display: "flex",
1596
+ gap: 2
1597
+ };
1598
+ const cell = {
1599
+ width: "50%",
1600
+ overflow: "hidden",
1601
+ borderRadius: "27.5%"
1602
+ };
1603
+ if (count === 1) {
1604
+ return /* @__PURE__ */ jsx(
1605
+ "div",
1606
+ {
1607
+ style: {
1608
+ display: "flex",
1609
+ alignItems: "center",
1610
+ justifyContent: "center",
1611
+ width: "100%",
1612
+ height: "100%"
1613
+ },
1614
+ children: /* @__PURE__ */ jsx("div", { style: { ...cell, width: "100%" }, children: renderWalletIcon(walletsToShow[0]) })
1615
+ }
1616
+ );
1617
+ }
1618
+ if (count === 2) {
1619
+ return /* @__PURE__ */ jsx(
1620
+ "div",
1621
+ {
1622
+ style: {
1623
+ display: "flex",
1624
+ alignItems: "center",
1625
+ justifyContent: "center",
1626
+ width: "100%",
1627
+ height: "100%"
1628
+ },
1629
+ children: /* @__PURE__ */ jsx("div", { style: { ...row, width: "100%" }, children: walletsToShow.map((w, i) => /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(w) }, i)) })
1630
+ }
1631
+ );
1632
+ } else if (count === 3) {
1633
+ return /* @__PURE__ */ jsxs("div", { style: column, children: [
1634
+ /* @__PURE__ */ jsx("div", { style: row, children: walletsToShow.slice(0, 2).map((w, i) => /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(w) }, i)) }),
1635
+ /* @__PURE__ */ jsx("div", { style: row, children: /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(walletsToShow[2]) }) })
1636
+ ] });
1637
+ } else {
1638
+ return /* @__PURE__ */ jsxs("div", { style: column, children: [
1639
+ /* @__PURE__ */ jsxs("div", { style: row, children: [
1640
+ /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(walletsToShow[0]) }),
1641
+ /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(walletsToShow[1]) })
1642
+ ] }),
1643
+ /* @__PURE__ */ jsxs("div", { style: row, children: [
1644
+ /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(walletsToShow[2]) }),
1645
+ /* @__PURE__ */ jsx("div", { style: cell, children: renderWalletIcon(walletsToShow[3]) })
1646
+ ] })
1647
+ ] });
1648
+ }
1649
+ }
1577
1650
  var Logos = {
1578
1651
  Mock,
1579
1652
  Injected,
@@ -1613,8 +1686,9 @@ var Logos = {
1613
1686
  Farcaster,
1614
1687
  MiniPay,
1615
1688
  World,
1616
- Porto
1689
+ Porto,
1690
+ createOtherWalletsIcon
1617
1691
  };
1618
1692
 
1619
- export { Argent, Backpack, Base, Bitget, Brave, Crypto, Dawn, Family, Farcaster, Frame, Frontier, ImToken, InfinityWallet, Injected, Ledger, MetaMask, MiniPay, Mock, ONTO, OtherWallets, Phantom, PlaceHolder, Porto, Rabby, Rainbow, Safe, Slope, Solflare, SquircleIcon, Steak, Trust, Unstoppable, WalletIcon, Zerion, Logos as default };
1693
+ export { Argent, Backpack, Base, Bitget, Brave, Crypto, Dawn, Family, Farcaster, Frame, Frontier, ImToken, InfinityWallet, Injected, Ledger, MetaMask, MiniPay, Mock, ONTO, OtherWallets, Phantom, PlaceHolder, Porto, Rabby, Rainbow, Safe, Slope, Solflare, SquircleIcon, Steak, Trust, Unstoppable, WalletIcon, Zerion, createOtherWalletsIcon, Logos as default };
1620
1694
  //# sourceMappingURL=logos.js.map