Merge pull request #198 from bhandras/segwit_fix

loopin: fix htlc address in LoopIn SwapResponse
pull/199/head v0.6.1-beta
Joost Jager 4 years ago committed by GitHub
commit d01c33cbb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save