@ -235,7 +234,7 @@ export class CLNEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('GenerateNewAddress',UI_MESSAGES.GENERATE_NEW_ADDRESS,'Generate New Address Failed',this.CHILD_API_URL+environment.ON_CHAIN_API+'?type='+action.payload.addressId,err);
this.handleErrorWithAlert('GenerateNewAddress',UI_MESSAGES.GENERATE_NEW_ADDRESS,'Generate New Address Failed',this.CHILD_API_URL+API_END_POINTS.ON_CHAIN_API+'?type='+action.payload.addressId,err);
returnof({type:RTLActions.VOID});
})
);
@ -257,7 +256,7 @@ export class CLNEffects implements OnDestroy {
@ -316,7 +315,7 @@ export class CLNEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('PeerDisconnect',UI_MESSAGES.DISCONNECT_PEER,'Unable to Detach Peer. Try again later.',this.CHILD_API_URL+environment.PEERS_API+'/'+action.payload.id,err);
this.handleErrorWithAlert('PeerDisconnect',UI_MESSAGES.DISCONNECT_PEER,'Unable to Detach Peer. Try again later.',this.CHILD_API_URL+API_END_POINTS.PEERS_API+'/'+action.payload.id,err);
returnof({type:RTLActions.VOID});
})
);
@ -327,7 +326,7 @@ export class CLNEffects implements OnDestroy {
@ -432,7 +431,7 @@ export class CLNEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('CloseChannel',(action.payload.force?UI_MESSAGES.FORCE_CLOSE_CHANNEL : UI_MESSAGES.CLOSE_CHANNEL),'Unable to Close Channel. Try again later.',this.CHILD_API_URL+environment.CHANNELS_API,err);
this.handleErrorWithAlert('CloseChannel',(action.payload.force?UI_MESSAGES.FORCE_CLOSE_CHANNEL : UI_MESSAGES.CLOSE_CHANNEL),'Unable to Close Channel. Try again later.',this.CHILD_API_URL+API_END_POINTS.CHANNELS_API,err);
returnof({type:RTLActions.VOID});
})
);
@ -443,7 +442,7 @@ export class CLNEffects implements OnDestroy {
@ -678,7 +677,7 @@ export class CLNEffects implements OnDestroy {
return{type:RTLActions.VOID};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('FetchForwardingHistory'+statusInitial,UI_MESSAGES.NO_SPINNER,'Get '+action.payload.status+' Forwarding History Failed',this.CHILD_API_URL+environment.CHANNELS_API+'/listForwards?status='+action.payload.status,err);
this.handleErrorWithAlert('FetchForwardingHistory'+statusInitial,UI_MESSAGES.NO_SPINNER,'Get '+action.payload.status+' Forwarding History Failed',this.CHILD_API_URL+API_END_POINTS.CHANNELS_API+'/listForwards?status='+action.payload.status,err);
returnof({type:RTLActions.VOID});
})
);
@ -690,7 +689,7 @@ export class CLNEffects implements OnDestroy {
@ -266,7 +265,7 @@ export class ECLEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('GetNewAddress',UI_MESSAGES.GENERATE_NEW_ADDRESS,'Generate New Address Failed',this.CHILD_API_URL+environment.ON_CHAIN_API,err);
this.handleErrorWithAlert('GetNewAddress',UI_MESSAGES.GENERATE_NEW_ADDRESS,'Generate New Address Failed',this.CHILD_API_URL+API_END_POINTS.ON_CHAIN_API,err);
returnof({type:RTLActions.VOID});
})
);
@ -288,7 +287,7 @@ export class ECLEffects implements OnDestroy {
@ -325,7 +324,7 @@ export class ECLEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('DisconnectPeer',UI_MESSAGES.DISCONNECT_PEER,'Unable to Detach Peer. Try again later.',this.CHILD_API_URL+environment.PEERS_API+'/'+action.payload.nodeId,err);
this.handleErrorWithAlert('DisconnectPeer',UI_MESSAGES.DISCONNECT_PEER,'Unable to Detach Peer. Try again later.',this.CHILD_API_URL+API_END_POINTS.PEERS_API+'/'+action.payload.nodeId,err);
returnof({type:RTLActions.VOID});
})
);
@ -341,7 +340,7 @@ export class ECLEffects implements OnDestroy {
@ -418,7 +417,7 @@ export class ECLEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('CloseChannel',((action.payload.force)?UI_MESSAGES.FORCE_CLOSE_CHANNEL : UI_MESSAGES.CLOSE_CHANNEL),'Unable to Close Channel. Try again later.',this.CHILD_API_URL+environment.CHANNELS_API,err);
this.handleErrorWithAlert('CloseChannel',((action.payload.force)?UI_MESSAGES.FORCE_CLOSE_CHANNEL : UI_MESSAGES.CLOSE_CHANNEL),'Unable to Close Channel. Try again later.',this.CHILD_API_URL+API_END_POINTS.CHANNELS_API,err);
returnof({type:RTLActions.VOID});
})
);
@ -427,7 +426,7 @@ export class ECLEffects implements OnDestroy {
@ -222,7 +221,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('DetachPeer',UI_MESSAGES.DISCONNECT_PEER,'Unable to Detach Peer. Try again later.',this.CHILD_API_URL+environment.PEERS_API+'/'+action.payload.pubkey,err);
this.handleErrorWithAlert('DetachPeer',UI_MESSAGES.DISCONNECT_PEER,'Unable to Detach Peer. Try again later.',this.CHILD_API_URL+API_END_POINTS.PEERS_API+'/'+action.payload.pubkey,err);
returnof({type:RTLActions.VOID});
})
);
@ -234,7 +233,7 @@ export class LNDEffects implements OnDestroy {
@ -359,7 +358,7 @@ export class LNDEffects implements OnDestroy {
return{type:RTLActions.VOID};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('CloseChannel',(action.payload.forcibly?UI_MESSAGES.FORCE_CLOSE_CHANNEL : UI_MESSAGES.CLOSE_CHANNEL),'Unable to Close Channel. Try again later.',this.CHILD_API_URL+environment.CHANNELS_API+'/'+action.payload.channelPoint+'?force='+action.payload.forcibly,err);
this.handleErrorWithAlert('CloseChannel',(action.payload.forcibly?UI_MESSAGES.FORCE_CLOSE_CHANNEL : UI_MESSAGES.CLOSE_CHANNEL),'Unable to Close Channel. Try again later.',this.CHILD_API_URL+API_END_POINTS.CHANNELS_API+'/'+action.payload.channelPoint+'?force='+action.payload.forcibly,err);
returnof({type:RTLActions.VOID});
})
);
@ -371,7 +370,7 @@ export class LNDEffects implements OnDestroy {
@ -383,7 +382,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('BackupChannels',action.payload.uiMessage,action.payload.showMessage+' Unable to Backup Channel. Try again later.',this.CHILD_API_URL+environment.CHANNELS_BACKUP_API+'/'+action.payload.channelPoint,err);
this.handleErrorWithAlert('BackupChannels',action.payload.uiMessage,action.payload.showMessage+' Unable to Backup Channel. Try again later.',this.CHILD_API_URL+API_END_POINTS.CHANNELS_BACKUP_API+'/'+action.payload.channelPoint,err);
returnof({type:RTLActions.VOID});
})
);
@ -395,7 +394,7 @@ export class LNDEffects implements OnDestroy {
@ -407,7 +406,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('VerifyChannel',UI_MESSAGES.VERIFY_CHANNEL,'Unable to Verify Channel. Try again later.',this.CHILD_API_URL+environment.CHANNELS_BACKUP_API+'/verify/'+action.payload.channelPoint,err);
this.handleErrorWithAlert('VerifyChannel',UI_MESSAGES.VERIFY_CHANNEL,'Unable to Verify Channel. Try again later.',this.CHILD_API_URL+API_END_POINTS.CHANNELS_BACKUP_API+'/verify/'+action.payload.channelPoint,err);
returnof({type:RTLActions.VOID});
})
);
@ -419,7 +418,7 @@ export class LNDEffects implements OnDestroy {
@ -432,7 +431,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('RestoreChannels',UI_MESSAGES.RESTORE_CHANNEL,'Unable to Restore Channel. Try again later.',this.CHILD_API_URL+environment.CHANNELS_BACKUP_API+'/restore/'+action.payload.channelPoint,err);
this.handleErrorWithAlert('RestoreChannels',UI_MESSAGES.RESTORE_CHANNEL,'Unable to Restore Channel. Try again later.',this.CHILD_API_URL+API_END_POINTS.CHANNELS_BACKUP_API+'/restore/'+action.payload.channelPoint,err);
returnof({type:RTLActions.VOID});
}));
}))
@ -442,7 +441,7 @@ export class LNDEffects implements OnDestroy {
@ -817,7 +816,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('GetNewAddress',UI_MESSAGES.GENERATE_NEW_ADDRESS,'Generate New Address Failed',this.CHILD_API_URL+environment.NEW_ADDRESS_API+'?type='+action.payload.addressId,err);
this.handleErrorWithAlert('GetNewAddress',UI_MESSAGES.GENERATE_NEW_ADDRESS,'Generate New Address Failed',this.CHILD_API_URL+API_END_POINTS.NEW_ADDRESS_API+'?type='+action.payload.addressId,err);
returnof({type:RTLActions.VOID});
}));
}))
@ -839,7 +838,7 @@ export class LNDEffects implements OnDestroy {
@ -879,7 +878,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('FetchForwardingHistory',UI_MESSAGES.NO_SPINNER,'Get Forwarding History Failed',this.CHILD_API_URL+environment.SWITCH_API,err);
this.handleErrorWithAlert('FetchForwardingHistory',UI_MESSAGES.NO_SPINNER,'Get Forwarding History Failed',this.CHILD_API_URL+API_END_POINTS.SWITCH_API,err);
returnof({type:RTLActions.VOID});
})
);
@ -889,7 +888,7 @@ export class LNDEffects implements OnDestroy {
@ -1160,7 +1159,7 @@ export class LNDEffects implements OnDestroy {
};
}),
catchError((err: any)=>{
this.handleErrorWithAlert('RestoreChannelsList',UI_MESSAGES.NO_SPINNER,'Restore Channels List Failed',this.CHILD_API_URL+environment.CHANNELS_BACKUP_API,err);
this.handleErrorWithAlert('RestoreChannelsList',UI_MESSAGES.NO_SPINNER,'Restore Channels List Failed',this.CHILD_API_URL+API_END_POINTS.CHANNELS_BACKUP_API,err);
returnof({type:RTLActions.VOID});
})
);
@ -1181,7 +1180,7 @@ export class LNDEffects implements OnDestroy {
returnthis.httpClient.post(this.swapUrl,requestBody).pipe(catchError((err)=>this.handleErrorWithoutAlert('Swap Out for Address: '+address,UI_MESSAGES.NO_SPINNER,err)));
returnthis.httpClient.post(this.swapUrl,requestBody).pipe(catchError((err)=>this.handleErrorWithoutAlert('Swap In for Amount: '+amount,UI_MESSAGES.NO_SPINNER,err)));
@ -259,12 +258,12 @@ export class DataService implements OnDestroy {
returnof(res);
}),
catchError((err)=>{
this.handleErrorWithAlert('getForwardingHistoryData',UI_MESSAGES.GET_FORWARDING_HISTORY,'Forwarding History Failed',this.APIUrl+'/lnd'+environment.SWITCH_API,err);
this.handleErrorWithAlert('getForwardingHistoryData',UI_MESSAGES.GET_FORWARDING_HISTORY,'Forwarding History Failed',this.APIUrl+'/lnd'+API_END_POINTS.SWITCH_API,err);
@ -273,7 +272,7 @@ export class DataService implements OnDestroy {
returnof(forwardsWithAlias);
}),
catchError((err)=>{
this.handleErrorWithAlert('getForwardingHistoryData',UI_MESSAGES.GET_FORWARDING_HISTORY,'Forwarding History Failed',this.APIUrl+'/cln'+environment.CHANNELS_API+'/listForwards?status='+status+'&start='+start+'&end='+end,err);
this.handleErrorWithAlert('getForwardingHistoryData',UI_MESSAGES.GET_FORWARDING_HISTORY,'Forwarding History Failed',this.APIUrl+'/cln'+API_END_POINTS.CHANNELS_API+'/listForwards?status='+status+'&start='+start+'&end='+end,err);
returnthis.httpClient.post(this.loopUrl,requestBody).pipe(catchError((err)=>this.handleErrorWithoutAlert('Loop Out for Channel: '+chanId,UI_MESSAGES.NO_SPINNER,err)));