docs/grpc: correct javascript macaroon example
Creating and adding metadata in single line resulted in null `metadata`
This commit is contained in:
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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user