mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-18 13:08:39 +02:00
Multinode Routing bug fix 2
Multinode Routing bug fix 2
This commit is contained in:
parent
4e3a5a8c9d
commit
36abb6806d
6 changed files with 9 additions and 6 deletions
|
|
@ -38,7 +38,7 @@ exports.listInvoices = (req, res, next) => {
|
|||
error: (undefined === body || search_idx > -1) ? 'Error From Server!' : body.error
|
||||
});
|
||||
} else {
|
||||
if (undefined !== body.invoices && body.invoices.length > 0) {
|
||||
if (body.invoices && body.invoices.length > 0) {
|
||||
body.invoices.forEach(invoice => {
|
||||
invoice.creation_date_str = (undefined === invoice.creation_date) ? '' : common.convertTimestampToDate(invoice.creation_date);
|
||||
invoice.settle_date_str = (undefined === invoice.settle_date) ? '' : common.convertTimestampToDate(invoice.settle_date);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ var num_max_events = 100;
|
|||
var responseData = { forwarding_events: [], last_offset_index: 0 };
|
||||
|
||||
exports.forwardingHistory = (req, res, next) => {
|
||||
responseData = { forwarding_events: [], last_offset_index: 0 };
|
||||
this.getAllForwardingEvents(req.body.start_time, req.body.end_time, 0, (eventsResponse) => {
|
||||
if (eventsResponse.error) {
|
||||
res.status(500).json(eventsResponse);
|
||||
|
|
@ -18,6 +17,7 @@ exports.forwardingHistory = (req, res, next) => {
|
|||
};
|
||||
|
||||
exports.getAllForwardingEvents = (start, end, offset, callback) => {
|
||||
if (offset === 0) { responseData = { forwarding_events: [], last_offset_index: 0 }; }
|
||||
options = common.getOptions();
|
||||
options.url = common.getSelLNServerUrl() + '/switch';
|
||||
options.form = {};
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ export class RoutingComponent implements OnInit, OnDestroy {
|
|||
ngOnInit() {
|
||||
this.actions$.pipe(takeUntil(this.unSubs[1]), filter((action) => action.type === RTLActions.RESET_LND_STORE || action.type === RTLActions.SET_ALL_CHANNELS))
|
||||
.subscribe((action: RTLActions.ResetLNDStore | RTLActions.SetAllChannels) => {
|
||||
this.onEventsFetch();
|
||||
if (action.type === RTLActions.RESET_LND_STORE && action.payload.lnImplementation === 'LND') {
|
||||
this.onEventsFetch();
|
||||
}
|
||||
});
|
||||
this.store.select('lnd')
|
||||
.pipe(takeUntil(this.unSubs[0]))
|
||||
|
|
|
|||
|
|
@ -1131,7 +1131,6 @@ export class LNDEffects implements OnDestroy {
|
|||
smaller_currency_unit: info.smaller_currency_unit
|
||||
};
|
||||
this.store.dispatch(new RTLActions.SetNodeData(node_data));
|
||||
this.store.dispatch(new RTLActions.FetchFees()); //Fetches monthly forwarding history as well, to count total number of events
|
||||
this.store.dispatch(new RTLActions.FetchPeers());
|
||||
this.store.dispatch(new RTLActions.FetchBalance('channels'));
|
||||
this.store.dispatch(new RTLActions.FetchNetwork());
|
||||
|
|
@ -1140,6 +1139,7 @@ export class LNDEffects implements OnDestroy {
|
|||
this.store.dispatch(new RTLActions.FetchClosedChannels());
|
||||
this.store.dispatch(new RTLActions.FetchInvoices({num_max_invoices: 10, reversed: true}));
|
||||
this.store.dispatch(new RTLActions.FetchPayments());
|
||||
this.store.dispatch(new RTLActions.FetchFees()); //Fetches monthly forwarding history as well, to count total number of events
|
||||
let newRoute = this.location.path();
|
||||
if(newRoute.includes('/cl/')) {
|
||||
newRoute = newRoute.replace('/cl/', '/lnd/');
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export interface SelNodeChild {
|
|||
selCurrencyUnit?: string;
|
||||
currencyUnits?: string[];
|
||||
fiatConversion?: boolean;
|
||||
lnImplementation?: string;
|
||||
}
|
||||
|
||||
export class HelpTopic {
|
||||
|
|
|
|||
|
|
@ -376,9 +376,9 @@ export class RTLEffects implements OnDestroy {
|
|||
const landingPage = isInitialSetup ? '' : 'HOME';
|
||||
let selNode = {};
|
||||
if(node.settings.fiatConversion && node.settings.currencyUnit) {
|
||||
selNode = { userPersona: node.settings.userPersona, channelBackupPath: node.settings.channelBackupPath, selCurrencyUnit: node.settings.currencyUnit, currencyUnits: [...CURRENCY_UNITS, node.settings.currencyUnit], fiatConversion: node.settings.fiatConversion };
|
||||
selNode = { lnImplementation: node.lnImplementation, userPersona: node.settings.userPersona, channelBackupPath: node.settings.channelBackupPath, selCurrencyUnit: node.settings.currencyUnit, currencyUnits: [...CURRENCY_UNITS, node.settings.currencyUnit], fiatConversion: node.settings.fiatConversion };
|
||||
} else {
|
||||
selNode = { userPersona: node.settings.userPersona, channelBackupPath: node.settings.channelBackupPath, selCurrencyUnit: node.settings.currencyUnit, currencyUnits: CURRENCY_UNITS, fiatConversion: node.settings.fiatConversion };
|
||||
selNode = { lnImplementation: node.lnImplementation, userPersona: node.settings.userPersona, channelBackupPath: node.settings.channelBackupPath, selCurrencyUnit: node.settings.currencyUnit, currencyUnits: CURRENCY_UNITS, fiatConversion: node.settings.fiatConversion };
|
||||
}
|
||||
this.store.dispatch(new RTLActions.ResetRootStore(node));
|
||||
this.store.dispatch(new RTLActions.ResetLNDStore(selNode));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue