@dogeos/dogeos-sdk 4.0.0-beta.7 → 4.0.0-beta.8
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.js +25 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40707,24 +40707,31 @@ function YH(e) {
|
|
|
40707
40707
|
function VH(e) {
|
|
40708
40708
|
const t = bf(e);
|
|
40709
40709
|
if (t.inFlight) return t.inFlight;
|
|
40710
|
-
|
|
40711
|
-
|
|
40712
|
-
|
|
40713
|
-
|
|
40714
|
-
|
|
40715
|
-
|
|
40716
|
-
|
|
40717
|
-
|
|
40718
|
-
|
|
40710
|
+
const r = t.generation;
|
|
40711
|
+
let n;
|
|
40712
|
+
const i = Promise.resolve().then(
|
|
40713
|
+
async () => {
|
|
40714
|
+
if (t.generation !== r)
|
|
40715
|
+
throw new Error("Provider session reconciliation was invalidated");
|
|
40716
|
+
const c = await e.getSession();
|
|
40717
|
+
if (c === null || Date.parse(c.expiresAt) > Date.now())
|
|
40718
|
+
return c;
|
|
40719
|
+
if (t.generation !== r)
|
|
40720
|
+
throw new Error("Provider session reconciliation was invalidated");
|
|
40721
|
+
return await e.refresh();
|
|
40722
|
+
}
|
|
40723
|
+
), s = new Promise((c) => {
|
|
40724
|
+
n = setTimeout(
|
|
40725
|
+
() => c({ kind: "unavailable" }),
|
|
40719
40726
|
jH
|
|
40720
40727
|
);
|
|
40721
|
-
}),
|
|
40722
|
-
(
|
|
40723
|
-
() =>
|
|
40724
|
-
),
|
|
40725
|
-
|
|
40728
|
+
}), o = i.then(
|
|
40729
|
+
(c) => c ? { kind: "authenticated", session: c } : { kind: "anonymous" },
|
|
40730
|
+
(c) => c instanceof $ && c.code === "session_revoked" ? { kind: "anonymous" } : { kind: "unavailable" }
|
|
40731
|
+
), a = Promise.race([o, s]).finally(() => {
|
|
40732
|
+
n !== void 0 && clearTimeout(n), t.inFlight === a && (t.inFlight = null);
|
|
40726
40733
|
});
|
|
40727
|
-
return t.inFlight =
|
|
40734
|
+
return t.inFlight = a, a;
|
|
40728
40735
|
}
|
|
40729
40736
|
function fx(e) {
|
|
40730
40737
|
if (!e) return !1;
|
|
@@ -41205,10 +41212,10 @@ function rX(e) {
|
|
|
41205
41212
|
return e.walletReinitializationRequired || e.walletOperationActive ? null : e.pendingWalletCompletion ? o4(
|
|
41206
41213
|
e.pendingWalletCompletion,
|
|
41207
41214
|
e.snapshot
|
|
41208
|
-
) ? "pending_completion" : null : e.embeddedCustodyConnected && (e.establishedWalletAccount === null || e.snapshot.kind === "anonymous" || e.snapshot.kind === "authenticated" &&
|
|
41215
|
+
) ? "pending_completion" : null : e.embeddedCustodyConnected && (e.establishedWalletAccount === null || e.snapshot.kind === "anonymous" || e.snapshot.kind === "authenticated" && !ig(
|
|
41209
41216
|
e.establishedWalletAccount,
|
|
41210
41217
|
e.snapshot.session
|
|
41211
|
-
))
|
|
41218
|
+
)) ? "established_custody" : null;
|
|
41212
41219
|
}
|
|
41213
41220
|
function nX(e) {
|
|
41214
41221
|
if (e.pendingWalletCompletion.current = null, e.establishedWalletAccount.current = null, e.resetWalletState(), !e.embeddedWallet) return Promise.resolve();
|
|
@@ -41251,7 +41258,7 @@ function iX(e, t) {
|
|
|
41251
41258
|
m(), d += 1, Date.parse(q.session.expiresAt) > Date.now() ? c({
|
|
41252
41259
|
kind: "authenticated",
|
|
41253
41260
|
session: q.session
|
|
41254
|
-
}) :
|
|
41261
|
+
}) : b();
|
|
41255
41262
|
else if (q.kind === "anonymous") {
|
|
41256
41263
|
if (i?.()) {
|
|
41257
41264
|
h = 0, b();
|