wakuconnect-chat-sdk/patches/it-length-prefixed@9.0.3.patch

16 lines
827 B
Diff

diff --git a/dist/src/decode.js b/dist/src/decode.js
index 313fdff5f4bbac228bd6e6e4954bce89ea341cab..d15be8a606b81987f16bd932a7836186d9419b09 100644
--- a/dist/src/decode.js
+++ b/dist/src/decode.js
@@ -6,7 +6,9 @@ import { isAsyncIterable } from './utils.js';
// Maximum length of the length section of the message
export const MAX_LENGTH_LENGTH = 8; // Varint.encode(Number.MAX_SAFE_INTEGER).length
// Maximum length of the data section of the message
-export const MAX_DATA_LENGTH = 1024 * 1024 * 4;
+// export const MAX_DATA_LENGTH = 1024 * 1024 * 4;
+// note: https://github.com/status-im/status-go/blob/afd72ace28ed6629297820af73053cea3e73e63b/waku/common/const.go#L43C33-L43C49
+export const MAX_DATA_LENGTH = 10 * 1024 * 1024;
var ReadMode;
(function (ReadMode) {
ReadMode[ReadMode["LENGTH"] = 0] = "LENGTH";