@babylonlabs-io/wallet-connector 0.6.0 → 0.6.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.
package/dist/index.es.js CHANGED
@@ -94888,10 +94888,10 @@ const createProvider$1 = (e) => ({
94888
94888
  if (!d || !d.startsWith("tomo.")) return;
94889
94889
  const m = d.replace("tomo.", ""), w = n.find((v) => v.id === m);
94890
94890
  w && a(w);
94891
- }, [e, t]), useEffect(() => {
94891
+ }, [n, e, t]), useEffect(() => {
94892
94892
  p && o && c(p, o);
94893
94893
  }, [p, o, c]), useEffect(() => u ? u.on("disconnect", (m) => {
94894
- m.id === "tomo-bbn-connector" && s.disconnect();
94894
+ m.id.startsWith("tomo.") && s.disconnect();
94895
94895
  }) : void 0, [u, s]), null;
94896
94896
  });
94897
94897
  TomoBBNConnector.displayName = "TomoBBNConnector";
@@ -94936,10 +94936,10 @@ const createProvider = (e) => ({
94936
94936
  if (!d || !d.startsWith("tomo.")) return;
94937
94937
  const m = d.replace("tomo.", ""), w = n.find((v) => v.id === m);
94938
94938
  w && a(w);
94939
- }, [e, t]), useEffect(() => {
94939
+ }, [n, e, t]), useEffect(() => {
94940
94940
  p && o && c(p, o);
94941
94941
  }, [p, o, c]), useEffect(() => u ? u.on("disconnect", (m) => {
94942
- m.id === "tomo-btc-connector" && s.disconnect();
94942
+ m.id.startsWith("tomo.") && s.disconnect();
94943
94943
  }) : void 0, [u, s]), null;
94944
94944
  });
94945
94945
  TomoBTCConnector.displayName = "TomoBTCConnector";
@@ -95005,15 +95005,15 @@ function useWalletConnectors({ persistent: e, accountStorage: t, onError: r }) {
95005
95005
  );
95006
95006
  return () => H.forEach((Ie) => Ie());
95007
95007
  }, [o, u, n]), useEffect(() => {
95008
- if (!o) return;
95009
95008
  const F = Object.values(n).filter(Boolean), H = {
95010
95009
  BTC: (Z) => async (y) => {
95011
95010
  var S, P, Tr;
95012
95011
  try {
95013
- y && y.account && (s == null || s("BTC", y), e && t.set(Z.id, y.id), await (O == null ? void 0 : O({
95012
+ if (!y || !y.account || (s == null || s("BTC", y), e && t.set(Z.id, y.id), !o)) return;
95013
+ await (O == null ? void 0 : O({
95014
95014
  address: y.account.address,
95015
95015
  public_key: y.account.publicKeyHex
95016
- })));
95016
+ }));
95017
95017
  const D = () => void (C ? c == null ? void 0 : c() : p == null ? void 0 : p());
95018
95018
  if (!validateAddressWithPK(
95019
95019
  ((S = y.account) == null ? void 0 : S.address) ?? "",