mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
rpc: fix regression in SendToRouteSync payment hash parsing
A recent change in this area of the codebase refactored some code to make way for the deprecation of the streaming multi-route `SendToRoute` method. Along the way, it removed the parsing of the `PaymentHashString` field for the sync `SendToRouteSync` which is meant to be used via the REST interface. In this commit, we fix this by populating _both_ `PaymentHash` and `PaymentHashString`. This is OK, as `extractPaymentIntent` will check both values to extract the hex-encoded payment hash if it's specified.
This commit is contained in:
parent
27cfdf944e
commit
9c940746a7
1 changed files with 2 additions and 1 deletions
|
@ -2719,7 +2719,8 @@ func unmarshallSendToRouteRequest(req *lnrpc.SendToRouteRequest,
|
|||
|
||||
return &rpcPaymentRequest{
|
||||
SendRequest: &lnrpc.SendRequest{
|
||||
PaymentHash: req.PaymentHash,
|
||||
PaymentHash: req.PaymentHash,
|
||||
PaymentHashString: req.PaymentHashString,
|
||||
},
|
||||
routes: routes,
|
||||
}, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue