@@ -191,22 +191,22 @@ export const circularRebalance = (req, res, next) => {
191191 setTimeout ( ( ) => {
192192 return getSentInfoFromPaymentRequest ( req . session . selectedNode , paymentHash ) . then ( ( sentInfoCallRes ) => {
193193 const payStatus = sentInfoCallRes . length && sentInfoCallRes . length > 0 ? sentInfoCallRes [ sentInfoCallRes . length - 1 ] . status : sentInfoCallRes ;
194- return res . status ( 201 ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : invoice , paymentHash : paymentHash , paymentDetails : payToRouteCallRes , paymentStatus : payStatus } ) ;
194+ return res . status ( 201 ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : invoice , paymentRoute : shortChannelIds , paymentHash : paymentHash , paymentDetails : payToRouteCallRes , paymentStatus : payStatus } ) ;
195195 } ) . catch ( ( errRes ) => {
196196 const err = common . handleError ( errRes , 'Channels' , 'Channel Rebalance From Sent Info Error' , req . session . selectedNode ) ;
197- return res . status ( err . statusCode ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : invoice , paymentHash : paymentHash , paymentDetails : payToRouteCallRes , paymentStatus : err . error } ) ;
197+ return res . status ( err . statusCode ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : invoice , paymentRoute : shortChannelIds , paymentHash : paymentHash , paymentDetails : payToRouteCallRes , paymentStatus : { error : err . error } } ) ;
198198 } ) ;
199199 } , 3000 ) ;
200200 } ) . catch ( ( errRes ) => {
201201 const err = common . handleError ( errRes , 'Channels' , 'Channel Rebalance From Send Payment To Route Error' , req . session . selectedNode ) ;
202- return res . status ( err . statusCode ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : invoice , paymentHash : paymentHash , paymentDetails : { } , paymentStatus : err . error } ) ;
202+ return res . status ( err . statusCode ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : invoice , paymentRoute : shortChannelIds , paymentHash : paymentHash , paymentDetails : { } , paymentStatus : { error : err . error } } ) ;
203203 } ) ;
204204 } ) . catch ( ( errRes ) => {
205205 const err = common . handleError ( errRes , 'Channels' , 'Channel Rebalance From Find Routes Error' , req . session . selectedNode ) ;
206- return res . status ( err . statusCode ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : ( foundExistingInvoice . serialized || '' ) , paymentHash : '' , paymentDetails : { } , paymentStatus : err . error } ) ;
206+ return res . status ( err . statusCode ) . json ( { flgReusingInvoice : ! ! foundExistingInvoice , invoice : ( foundExistingInvoice . serialized || '' ) , paymentRoute : '' , paymentHash : '' , paymentDetails : { } , paymentStatus : { error : err . error } } ) ;
207207 } ) ;
208208 } ) . catch ( ( errRes ) => {
209209 const err = common . handleError ( errRes , 'Channels' , 'Channel Rebalance From List Pending Invoices Error' , req . session . selectedNode ) ;
210- return res . status ( err . statusCode ) . json ( { flgReusingInvoice : false , invoice : '' , paymentHash : '' , paymentDetails : { } , paymentStatus : err . error } ) ;
210+ return res . status ( err . statusCode ) . json ( { flgReusingInvoice : false , invoice : '' , paymentRoute : '' , paymentHash : '' , paymentDetails : { } , paymentStatus : { error : err . error } } ) ;
211211 } ) ;
212212} ;
0 commit comments