@nanogpt/private-mode 0.2.1 → 0.2.2
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.
|
@@ -52,8 +52,10 @@ export function createSecureState(apiBase, options = {}) {
|
|
|
52
52
|
});
|
|
53
53
|
await client.ready();
|
|
54
54
|
nextState.client = client;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
if (clientState === nextState) {
|
|
56
|
+
verificationDocument = client.getVerificationDocument();
|
|
57
|
+
verificationError = null;
|
|
58
|
+
}
|
|
57
59
|
return client;
|
|
58
60
|
});
|
|
59
61
|
nextState.promise = promise;
|
|
@@ -62,8 +64,10 @@ export function createSecureState(apiBase, options = {}) {
|
|
|
62
64
|
try {
|
|
63
65
|
return await promise;
|
|
64
66
|
} catch (error) {
|
|
65
|
-
if (clientState === nextState)
|
|
66
|
-
|
|
67
|
+
if (clientState === nextState) {
|
|
68
|
+
clientState = null;
|
|
69
|
+
verificationError = error;
|
|
70
|
+
}
|
|
67
71
|
throw error;
|
|
68
72
|
}
|
|
69
73
|
}
|
|
@@ -75,6 +79,7 @@ export function createSecureState(apiBase, options = {}) {
|
|
|
75
79
|
if (client && clientState.client !== client) return false;
|
|
76
80
|
clientState = null;
|
|
77
81
|
verificationDocument = null;
|
|
82
|
+
verificationError = null;
|
|
78
83
|
return true;
|
|
79
84
|
},
|
|
80
85
|
getVerificationState() {
|