@babylonlabs-io/wallet-connector 1.0.3 → 1.0.4

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
@@ -98523,20 +98523,29 @@ function useWalletConnectors({ persistent: e, accountStorage: t, onError: r }) {
98523
98523
  );
98524
98524
  return { connect: O, disconnect: M };
98525
98525
  }
98526
- function useWalletWidgets(e, t) {
98527
- const r = useCallback(
98528
- (n, o) => /* @__PURE__ */ jsx(Fragment, { children: o.map(({ id: s, widget: a }) => /* @__PURE__ */ jsx(a, { id: s, connector: e[n], createWallet: createExternalWallet }, s)) }),
98529
- [e]
98526
+ function useWalletWidgets(e, t, r) {
98527
+ const n = useCallback(
98528
+ (o, s) => /* @__PURE__ */ jsx(Fragment, { children: s.map(({ id: a, widget: u }) => /* @__PURE__ */ jsx(
98529
+ u,
98530
+ {
98531
+ id: a,
98532
+ connector: e[o],
98533
+ createWallet: createExternalWallet,
98534
+ onError: r
98535
+ },
98536
+ a
98537
+ )) }),
98538
+ [e, r]
98530
98539
  );
98531
98540
  return useMemo(
98532
98541
  () => t.reduce(
98533
- (n, o) => ({
98534
- ...n,
98535
- [o.chain]: r(o.chain, o.connectors ?? [])
98542
+ (o, s) => ({
98543
+ ...o,
98544
+ [s.chain]: n(s.chain, s.connectors ?? [])
98536
98545
  }),
98537
98546
  {}
98538
98547
  ),
98539
- [r, t]
98548
+ [n, t]
98540
98549
  );
98541
98550
  }
98542
98551
  function ChainButton({ className: e, disabled: t, alt: r, logo: n, title: o, children: s, onClick: a }) {
@@ -98963,7 +98972,7 @@ function Screen(e) {
98963
98972
  }
98964
98973
  const ANIMATION_DELAY = 1e3;
98965
98974
  function WalletDialog({ persistent: e, storage: t, config: r, onError: n }) {
98966
- const { visible: o, screen: s, confirmed: a, close: u, confirm: p, displayChains: d } = useWidgetState(), { toggleShowAgain: c, toggleLockInscriptions: m } = useInscriptionProvider(), _ = useChainProviders(), v = useWalletWidgets(_, r), { connect: S, disconnect: E } = useWalletConnectors({ persistent: e, accountStorage: t, onError: n }), { disconnect: x } = useWalletConnect(), O = useCallback(() => {
98975
+ const { visible: o, screen: s, confirmed: a, close: u, confirm: p, displayChains: d } = useWidgetState(), { toggleShowAgain: c, toggleLockInscriptions: m } = useInscriptionProvider(), _ = useChainProviders(), v = useWalletWidgets(_, r, n), { connect: S, disconnect: E } = useWalletConnectors({ persistent: e, accountStorage: t, onError: n }), { disconnect: x } = useWalletConnect(), O = useCallback(() => {
98967
98976
  d == null || d();
98968
98977
  }, [d]), M = useCallback(
98969
98978
  (V, H) => {