Merge branch 'main' into soon

This commit is contained in:
ansuz 2022-12-13 16:43:16 +05:30
commit 9a5b54d091
3 changed files with 495 additions and 241 deletions

730
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
"@mcrowe/minibloom": "^0.2.0",
"chainpad-crypto": "^0.2.5",
"chainpad-server": "^5.1.0",
"express": "~4.16.0",
"express": "~4.18.2",
"fs-extra": "^7.0.0",
"get-folder-size": "^2.0.1",
"netflux-websocket": "^0.1.20",

View File

@ -171,10 +171,12 @@ define([
var data;
// apparently some browser extensions send messages to random targets
// which can trigger parse errors that interrupt normal behaviour
// we therefore log a warning and ignore any messages we can't parse
try {
data = typeof(msg.data) === "object" ? msg.data : JSON.parse(msg.data);
} catch (err) {
console.error(err);
console.warn(err);
return;
}
if (typeof(data.ack) !== "undefined") {
if (acks[data.txid]) { acks[data.txid](!data.ack); }