Skip to content

Commit

Permalink
fix(grpc): use Numbers to represent long values
Browse files Browse the repository at this point in the history
Configure gRPC to use Numbers to represent long values instead of
Strings. This ensures that we can do accurate handling of numerical
values.

Fix LN-Zap#727
  • Loading branch information
mrfelton committed Aug 29, 2018
1 parent 2931eff commit c12ca87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/lnd/lightning.js
Expand Up @@ -71,7 +71,7 @@ class Lightning {
// See https://github.com/grpc/grpc-node/blob/master/packages/grpc-protobufjs/README.md
const options = {
keepCase: true,
longs: String,
longs: Number,
enums: String,
defaults: true,
oneofs: true
Expand Down
2 changes: 1 addition & 1 deletion app/lib/lnd/walletUnlocker.js
Expand Up @@ -21,7 +21,7 @@ export const walletUnlocker = lndConfig => {
// See https://github.com/grpc/grpc-node/blob/master/packages/grpc-protobufjs/README.md
const options = {
keepCase: true,
longs: String,
longs: Number,
enums: String,
defaults: true,
oneofs: true
Expand Down

0 comments on commit c12ca87

Please sign in to comment.