@polyguard/sdk 1.0.2 → 1.0.3
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/sdk.js
CHANGED
|
@@ -11038,7 +11038,7 @@
|
|
|
11038
11038
|
const ticketRes = await fetch(`https://${this.apiServer}/v2/ticket/${this.appId}`, {
|
|
11039
11039
|
method: "POST",
|
|
11040
11040
|
headers: { "Content-Type": "application/json" },
|
|
11041
|
-
body: JSON.stringify({ requiredProofs: this.requiredProofs })
|
|
11041
|
+
body: JSON.stringify({ requiredProofs: this.requiredProofs, scanType: this.scanType })
|
|
11042
11042
|
});
|
|
11043
11043
|
if (!ticketRes.ok) {
|
|
11044
11044
|
showError("Failed to get ticket");
|
|
@@ -11097,6 +11097,7 @@
|
|
|
11097
11097
|
}
|
|
11098
11098
|
} catch (e) {
|
|
11099
11099
|
showError("Invalid message format from server");
|
|
11100
|
+
ws.close();
|
|
11100
11101
|
}
|
|
11101
11102
|
});
|
|
11102
11103
|
ws.addEventListener("error", () => {
|
package/package.json
CHANGED
|
@@ -100,7 +100,7 @@ export class PolyguardWebsocketClientImpl {
|
|
|
100
100
|
const ticketRes = await fetch(`https://${this.apiServer}/v2/ticket/${this.appId}`, {
|
|
101
101
|
method: 'POST',
|
|
102
102
|
headers: { 'Content-Type': 'application/json' },
|
|
103
|
-
body: JSON.stringify({ requiredProofs: this.requiredProofs }),
|
|
103
|
+
body: JSON.stringify({ requiredProofs: this.requiredProofs, scanType: this.scanType }),
|
|
104
104
|
});
|
|
105
105
|
if (!ticketRes.ok) {
|
|
106
106
|
showError('Failed to get ticket');
|
|
@@ -169,6 +169,7 @@ export class PolyguardWebsocketClientImpl {
|
|
|
169
169
|
}
|
|
170
170
|
} catch (e) {
|
|
171
171
|
showError('Invalid message format from server');
|
|
172
|
+
ws.close();
|
|
172
173
|
}
|
|
173
174
|
});
|
|
174
175
|
ws.addEventListener('error', () => {
|