@babylonlabs-io/wallet-connector 0.6.9 → 1.0.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.es.js CHANGED
@@ -97078,10 +97078,7 @@ function WalletButton({
97078
97078
  }
97079
97079
  const Wallets = memo(({ chain: e, className: t, append: r, onClose: n, onBack: o, onSelectWallet: s }) => {
97080
97080
  const a = useMemo(
97081
- () => e.wallets.find((c) => c.id === "injectable" && c.installed),
97082
- [e]
97083
- ), u = useMemo(() => e.wallets.filter((c) => c.id !== "injectable"), [e]), p = useMemo(
97084
- () => e.wallets.filter((c) => c.id !== "injectable" || c.installed).length,
97081
+ () => e.wallets.filter((u) => u.id === "injectable" ? u.installed : !0),
97085
97082
  [e]
97086
97083
  );
97087
97084
  return /* @__PURE__ */ jsxs("div", { className: twMerge("flex flex-1 flex-col", t), children: [
@@ -97091,36 +97088,18 @@ const Wallets = memo(({ chain: e, className: t, append: r, onClose: n, onBack: o
97091
97088
  " Wallet"
97092
97089
  ] }) }),
97093
97090
  /* @__PURE__ */ jsxs(DialogBody, { children: [
97094
- /* @__PURE__ */ jsxs(
97095
- "div",
97091
+ /* @__PURE__ */ jsx("div", { className: twMerge("grid gap-6", a.length > 1 ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1"), children: a.map((u) => /* @__PURE__ */ jsx(
97092
+ WalletButton,
97096
97093
  {
97097
- className: twMerge("grid gap-6", p > 1 ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1"),
97098
- children: [
97099
- a && /* @__PURE__ */ jsx(
97100
- WalletButton,
97101
- {
97102
- installed: !0,
97103
- name: a.name,
97104
- logo: a.icon,
97105
- label: a.label,
97106
- onClick: () => s == null ? void 0 : s(e, a)
97107
- }
97108
- ),
97109
- u.map((c) => /* @__PURE__ */ jsx(
97110
- WalletButton,
97111
- {
97112
- installed: c.installed,
97113
- name: c.name,
97114
- logo: c.icon,
97115
- label: c.label,
97116
- fallbackLink: c.docs,
97117
- onClick: () => s == null ? void 0 : s(e, c)
97118
- },
97119
- c.id
97120
- ))
97121
- ]
97122
- }
97123
- ),
97094
+ installed: u.installed,
97095
+ name: u.name,
97096
+ logo: u.icon,
97097
+ label: u.label,
97098
+ fallbackLink: u.docs,
97099
+ onClick: () => s == null ? void 0 : s(e, u)
97100
+ },
97101
+ u.id
97102
+ )) }),
97124
97103
  r
97125
97104
  ] }),
97126
97105
  /* @__PURE__ */ jsx(DialogFooter, { className: "mt-auto pt-10", children: /* @__PURE__ */ jsx(Button, { variant: "outlined", fluid: !0, onClick: o, children: "Back" }) })