mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-13 12:33:24 +02:00
notes:
* grpcjs doesnt like ByteBuffer, it has been replaced with the nodejs
native Buffer
* grpcjs doesnt like calls without an argument, add {} instead
see src/grpc/subscribe.ts:24
* grpcjs converts uint64 in a map key (map<uint64, ...>) to some hash,
this is fixed with protobuf_long.patch which is automatically applied
after running `npm install`
this pr would fix the bug upstream https://github.com/protobufjs/protobuf.js/pull/1669
13 lines
601 B
Diff
13 lines
601 B
Diff
diff --git a/node_modules/protobufjs/src/decoder.js b/node_modules/protobufjs/src/decoder.js
|
|
index 491dd30..cfaa927 100644
|
|
--- a/node_modules/protobufjs/src/decoder.js
|
|
+++ b/node_modules/protobufjs/src/decoder.js
|
|
@@ -72,7 +72,7 @@ function decoder(mtype) {
|
|
("}");
|
|
|
|
if (types.long[field.keyType] !== undefined) gen
|
|
- ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref);
|
|
+ ("%s[util.Long.isLong(k)?k.toString():typeof k===\"object\"?util.longToHash(k):k]=value", ref);
|
|
else gen
|
|
("%s[k]=value", ref);
|
|
|