@sparkvault/sdk 1.21.4 → 1.21.5
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/sparkvault.esm.js
CHANGED
|
@@ -5014,7 +5014,16 @@ class IdentityRenderer {
|
|
|
5014
5014
|
}
|
|
5015
5015
|
}, 10000);
|
|
5016
5016
|
ws.onopen = () => {
|
|
5017
|
-
|
|
5017
|
+
try {
|
|
5018
|
+
ws.send(JSON.stringify({ action: 'init' }));
|
|
5019
|
+
}
|
|
5020
|
+
catch {
|
|
5021
|
+
if (!resolved) {
|
|
5022
|
+
resolved = true;
|
|
5023
|
+
clearTimeout(timeout);
|
|
5024
|
+
resolve(null);
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5018
5027
|
};
|
|
5019
5028
|
ws.onmessage = (event) => {
|
|
5020
5029
|
let data;
|
|
@@ -5136,6 +5145,11 @@ class IdentityRenderer {
|
|
|
5136
5145
|
const connectionId = await this.openSparkLinkWebSocket();
|
|
5137
5146
|
if (!connectionId) {
|
|
5138
5147
|
this.cleanupSparkLink();
|
|
5148
|
+
this.setState({
|
|
5149
|
+
view: 'error',
|
|
5150
|
+
message: 'Unable to establish a secure connection. Please try again or choose a different method.',
|
|
5151
|
+
code: 'sparklink_ws_failed',
|
|
5152
|
+
});
|
|
5139
5153
|
return;
|
|
5140
5154
|
}
|
|
5141
5155
|
const result = await this.sparkLinkHandler.send(connectionId);
|
|
@@ -5148,6 +5162,11 @@ class IdentityRenderer {
|
|
|
5148
5162
|
}
|
|
5149
5163
|
else {
|
|
5150
5164
|
this.cleanupSparkLink();
|
|
5165
|
+
this.setState({
|
|
5166
|
+
view: 'error',
|
|
5167
|
+
message: result.error ?? 'Failed to resend verification link. Please try again.',
|
|
5168
|
+
code: 'sparklink_resend_failed',
|
|
5169
|
+
});
|
|
5151
5170
|
}
|
|
5152
5171
|
}
|
|
5153
5172
|
/**
|