@ethora/chat-component 25.6.7 → 25.6.9

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/main.js CHANGED
@@ -2171,17 +2171,13 @@ async function Vu(n) {
2171
2171
  }
2172
2172
  function _n(n, e) {
2173
2173
  return new Promise((i, t) => {
2174
- const r = setTimeout(() => {
2174
+ setTimeout(() => {
2175
2175
  try {
2176
2176
  e && e();
2177
- } catch (s) {
2178
- console.error("Error in timeout callback:", s);
2177
+ } catch {
2179
2178
  }
2180
- t(new Error("Operation timed out"));
2179
+ t();
2181
2180
  }, n);
2182
- return () => {
2183
- clearTimeout(r);
2184
- };
2185
2181
  });
2186
2182
  }
2187
2183
  async function Hd(n, e) {
@@ -2400,13 +2396,13 @@ const ys = async (n, e, i = 2e3) => {
2400
2396
  const r = () => n.off("stanza", t);
2401
2397
  return new Promise(async (s, a) => {
2402
2398
  let A = !1;
2403
- const o = (l, c) => {
2399
+ const o = (d, l) => {
2404
2400
  A || (A = !0, setTimeout(() => {
2405
- r(), l(c);
2401
+ r(), d(l);
2406
2402
  }, i));
2407
2403
  };
2408
- t = (l) => {
2409
- l.is("presence") && l.attrs.id === "presenceInRoom" && l.attrs.from?.startsWith(e) && o(s, l);
2404
+ t = (d) => {
2405
+ d.is("presence") && d.attrs.id === "presenceInRoom" && d.attrs.from?.startsWith(e) && o(s, d);
2410
2406
  }, n.on("stanza", t);
2411
2407
  const f = Y.xml(
2412
2408
  "presence",
@@ -2419,17 +2415,14 @@ const ys = async (n, e, i = 2e3) => {
2419
2415
  );
2420
2416
  try {
2421
2417
  await n.send(f);
2422
- } catch (l) {
2423
- return r(), a(l);
2418
+ } catch (d) {
2419
+ return r(), a(d);
2424
2420
  }
2425
- const d = _n(2e3, () => {
2426
- A || o(a, new Error("Presence in room timeout"));
2421
+ await _n(
2422
+ 2e3,
2423
+ () => o(a, new Error("Presence in room timeout"))
2424
+ ).catch(() => {
2427
2425
  });
2428
- try {
2429
- await d;
2430
- } catch {
2431
- A || o(a, new Error("Presence in room timeout"));
2432
- }
2433
2426
  });
2434
2427
  };
2435
2428
  function r0(n, e) {
@@ -30627,9 +30620,9 @@ const Kx = ({
30627
30620
  }
30628
30621
  ), i?.refreshTokens?.enabled && iA();
30629
30622
  }
30630
- t(Qe({ loading: !1 })), A(!1);
30623
+ t(Qe({ loading: !1 }));
30631
30624
  } catch (w) {
30632
- A(!1), s(!0), t(Qe({ loading: !1 })), console.log(w);
30625
+ A(!0), s(!1), t(Qe({ loading: !1 })), console.log(w);
30633
30626
  }
30634
30627
  })();
30635
30628
  }, [b.xmppPassword, b.defaultWallet?.walletAddress]), {