Browse Source
feat(lnd): support numRoutes in queryroutes
renovate/lint-staged-8.x
Tom Kirkpatrick
6 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
1 changed files with
2 additions and
3 deletions
-
app/lib/lnd/methods/networkController.js
|
|
@ -58,13 +58,12 @@ export function describeGraph(lnd) { |
|
|
|
* @param {[type]} amount [description] |
|
|
|
* @return {[type]} [description] |
|
|
|
*/ |
|
|
|
export function queryRoutes(lnd, { pubkey, amount }) { |
|
|
|
export function queryRoutes(lnd, { pubkey, amount, numRoutes = 15 }) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
lnd.queryRoutes({ pub_key: pubkey, amt: amount }, (err, data) => { |
|
|
|
lnd.queryRoutes({ pub_key: pubkey, amt: amount, num_routes: numRoutes }, (err, data) => { |
|
|
|
if (err) { |
|
|
|
return reject(err) |
|
|
|
} |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
}) |
|
|
|
}) |
|
|
|