mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
LND blank remote alias bug fix
This commit is contained in:
parent
921fb6850e
commit
9e2c9e05c5
@ -9,11 +9,11 @@ export const getAliasForChannel = (selNode, channel) => {
|
||||
options.url = selNode.ln_server_url + '/v1/graph/node/' + pubkey;
|
||||
return request(options).then((aliasBody) => {
|
||||
logger.log({ selectedNode: selNode, level: 'DEBUG', fileName: 'Channels', msg: 'Alias Received', data: aliasBody.node.alias });
|
||||
channel.remote_alias = aliasBody.node.alias;
|
||||
return aliasBody.node.alias;
|
||||
channel.remote_alias = aliasBody.node.alias && aliasBody.node.alias !== '' ? aliasBody.node.alias : aliasBody.node.pub_key.slice(0, 20);
|
||||
return channel;
|
||||
}).catch((err) => {
|
||||
channel.remote_alias = pubkey.slice(0, 20);
|
||||
return pubkey;
|
||||
return channel;
|
||||
});
|
||||
};
|
||||
export const getAllChannels = (req, res, next) => {
|
||||
@ -159,7 +159,7 @@ export const postTransactions = (req, res, next) => {
|
||||
if (options.error) {
|
||||
return res.status(options.statusCode).json({ message: options.message, error: options.error });
|
||||
}
|
||||
options.url = req.session.selectedNode.ln_server_url + '/v1/channels/transactions';
|
||||
options.url = req.session.selectedNode.ln_server_url + '/v1/channels/transaction-stream';
|
||||
options.form = { payment_request: req.body.paymentReq };
|
||||
if (req.body.paymentAmount) {
|
||||
options.form.amt = req.body.paymentAmount;
|
||||
|
@ -11,11 +11,11 @@ export const getAliasForChannel = (selNode: CommonSelectedNode, channel) => {
|
||||
options.url = selNode.ln_server_url + '/v1/graph/node/' + pubkey;
|
||||
return request(options).then((aliasBody) => {
|
||||
logger.log({ selectedNode: selNode, level: 'DEBUG', fileName: 'Channels', msg: 'Alias Received', data: aliasBody.node.alias });
|
||||
channel.remote_alias = aliasBody.node.alias;
|
||||
return aliasBody.node.alias;
|
||||
channel.remote_alias = aliasBody.node.alias && aliasBody.node.alias !== '' ? aliasBody.node.alias : aliasBody.node.pub_key.slice(0, 20);
|
||||
return channel;
|
||||
}).catch((err) => {
|
||||
channel.remote_alias = pubkey.slice(0, 20);
|
||||
return pubkey;
|
||||
return channel;
|
||||
});
|
||||
};
|
||||
|
||||
@ -154,7 +154,7 @@ export const postTransactions = (req, res, next) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Sending Payment..' });
|
||||
options = common.getOptions(req);
|
||||
if (options.error) { return res.status(options.statusCode).json({ message: options.message, error: options.error }); }
|
||||
options.url = req.session.selectedNode.ln_server_url + '/v1/channels/transactions';
|
||||
options.url = req.session.selectedNode.ln_server_url + '/v1/channels/transaction-stream';
|
||||
options.form = { payment_request: req.body.paymentReq };
|
||||
if (req.body.paymentAmount) {
|
||||
options.form.amt = req.body.paymentAmount;
|
||||
|
Loading…
Reference in New Issue
Block a user