mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 06:34:27 +01:00
lnd: Add payment hash to SendResponse
This commit is contained in:
@@ -2638,6 +2638,7 @@ func (r *rpcServer) sendPayment(stream *paymentStream) error {
|
||||
if err != nil {
|
||||
if err := stream.send(&lnrpc.SendResponse{
|
||||
PaymentError: err.Error(),
|
||||
PaymentHash: payIntent.rHash[:],
|
||||
}); err != nil {
|
||||
select {
|
||||
case errChan <- err:
|
||||
@@ -2696,6 +2697,7 @@ func (r *rpcServer) sendPayment(stream *paymentStream) error {
|
||||
case resp.Err != nil:
|
||||
err := stream.send(&lnrpc.SendResponse{
|
||||
PaymentError: resp.Err.Error(),
|
||||
PaymentHash: payIntent.rHash[:],
|
||||
})
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
@@ -2705,6 +2707,7 @@ func (r *rpcServer) sendPayment(stream *paymentStream) error {
|
||||
|
||||
marshalledRouted := r.marshallRoute(resp.Route)
|
||||
err := stream.send(&lnrpc.SendResponse{
|
||||
PaymentHash: payIntent.rHash[:],
|
||||
PaymentPreimage: resp.Preimage[:],
|
||||
PaymentRoute: marshalledRouted,
|
||||
})
|
||||
@@ -2789,10 +2792,12 @@ func (r *rpcServer) sendPaymentSync(ctx context.Context,
|
||||
case resp.Err != nil:
|
||||
return &lnrpc.SendResponse{
|
||||
PaymentError: resp.Err.Error(),
|
||||
PaymentHash: payIntent.rHash[:],
|
||||
}, nil
|
||||
}
|
||||
|
||||
return &lnrpc.SendResponse{
|
||||
PaymentHash: payIntent.rHash[:],
|
||||
PaymentPreimage: resp.Preimage[:],
|
||||
PaymentRoute: r.marshallRoute(resp.Route),
|
||||
}, nil
|
||||
|
||||
Reference in New Issue
Block a user