mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-15 12:50:28 +02:00
Merge pull request #198 from bhandras/segwit_fix
loopin: fix htlc address in LoopIn SwapResponse
This commit is contained in:
commit
d01c33cbb6
1 changed files with 7 additions and 6 deletions
|
|
@ -434,16 +434,17 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
np2wshAddress := swapInfo.HtlcAddressNP2WSH.String()
|
||||
response := &looprpc.SwapResponse{
|
||||
Id: swapInfo.SwapHash.String(),
|
||||
IdBytes: swapInfo.SwapHash[:],
|
||||
HtlcAddress: np2wshAddress,
|
||||
HtlcAddressNp2Wsh: np2wshAddress,
|
||||
Id: swapInfo.SwapHash.String(),
|
||||
IdBytes: swapInfo.SwapHash[:],
|
||||
HtlcAddressP2Wsh: swapInfo.HtlcAddressP2WSH.String(),
|
||||
}
|
||||
|
||||
if req.ExternalHtlc {
|
||||
response.HtlcAddressP2Wsh = swapInfo.HtlcAddressP2WSH.String()
|
||||
response.HtlcAddressNp2Wsh = swapInfo.HtlcAddressNP2WSH.String()
|
||||
response.HtlcAddress = response.HtlcAddressNp2Wsh
|
||||
} else {
|
||||
response.HtlcAddress = response.HtlcAddressP2Wsh
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue