implement lnd pub getter method

This commit is contained in:
Daniel Lugo 2021-01-18 16:37:18 -04:00
parent 9c1e980bd3
commit b4a24ce7fc

View file

@ -240,7 +240,18 @@ const decodePayReq = payReq =>
/**
* @returns {Promise<string>}
*/
const myLNDPub = () => Promise.resolve('afjsjkhasdjkhajksd')
const myLNDPub = () =>
Common.makePromise((res, rej) => {
const { lightning } = lightningServices.getServices()
lightning.getInfo({}, (err, data) => {
if (err) {
rej(new Error(err.message))
} else {
res(data.identity_pubkey)
}
})
})
/**
* aklssjdklasd