From caf81397503392bf83d9b107ed38ed777ac769c7 Mon Sep 17 00:00:00 2001 From: Richard Bondi Date: Wed, 25 Apr 2018 15:38:39 -0500 Subject: [PATCH] docs/grpc: correct javascript macaroon example Creating and adding metadata in single line resulted in null `metadata` --- docs/grpc/javascript.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/grpc/javascript.md b/docs/grpc/javascript.md index 57fc13e4..6a37d8dd 100644 --- a/docs/grpc/javascript.md +++ b/docs/grpc/javascript.md @@ -201,7 +201,8 @@ var m = fs.readFileSync('~/.lnd/admin.macaroon'); var macaroon = m.toString('hex'); // build meta data credentials -var metadata = new grpc.Metadata().add('macaroon', macaroon) +var metadata = new grpc.Metadata() +metadata.add('macaroon', macaroon) var macaroonCreds = grpc.credentials.createFromMetadataGenerator((_args, callback) => { callback(null, metadata); });