mirror of
https://github.com/apotdevin/thunderhub.git
synced 2024-11-19 18:00:05 +01:00
fix: small channel report fix
This commit is contained in:
parent
13006ac3e3
commit
53365e47f1
@ -25,6 +25,10 @@ export const getChannelReport = {
|
|||||||
try {
|
try {
|
||||||
const channels: GetChannelsProps = await getChannels({ lnd });
|
const channels: GetChannelsProps = await getChannels({ lnd });
|
||||||
|
|
||||||
|
if (channels.channels.length <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const maxOutgoing = Math.max.apply(
|
const maxOutgoing = Math.max.apply(
|
||||||
Math,
|
Math,
|
||||||
channels.channels.map(o => {
|
channels.channels.map(o => {
|
||||||
@ -53,7 +57,7 @@ export const getChannelReport = {
|
|||||||
maxOut: maxOutgoing,
|
maxOut: maxOutgoing,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error getting channel fees: %o', error);
|
logger.error('Error getting channel report: %o', error);
|
||||||
throw new Error(getErrorMsg(error));
|
throw new Error(getErrorMsg(error));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user