docs/grpc: correct javascript macaroon example

Creating and adding metadata in single line resulted in null `metadata`
This commit is contained in:
Richard Bondi 2018-04-25 15:38:39 -05:00 committed by Olaoluwa Osuntokun
parent c9eb077935
commit caf8139750

@ -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);
});