Release v2.2.0

This commit is contained in:
Santiago Lezica
2021-11-12 19:06:13 -03:00
parent 64a820d429
commit 58d843ad79
249 changed files with 73797 additions and 1145 deletions

View File

@@ -52,7 +52,16 @@ type KeyDescriptor struct {
func (d *KeyDescriptor) DeriveTo(path string) (*hdkeychain.ExtendedKey, error) {
key := d.Key
indexes := hdpath.MustParse(path).IndexesFrom(hdpath.MustParse(d.Path))
currentPath, err := hdpath.Parse(d.Path)
if err != nil {
return nil, fmt.Errorf("invalid current key path: %w", err)
}
targetPath, err := hdpath.Parse(path)
if err != nil {
return nil, fmt.Errorf("invalid target key path: %w", err)
}
indexes := targetPath.IndexesFrom(currentPath)
for _, index := range indexes {
var err error
var modifier uint32

View File

@@ -7,6 +7,7 @@ import (
"fmt"
"github.com/btcsuite/btcd/txscript"
"github.com/muun/libwallet/btcsuitew/btcutilw"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcutil"
@@ -113,7 +114,7 @@ func CreateWitnessScriptSubmarineSwapV1(refundAddress string, paymentHash []byte
// payment preimage, so we still have to do a pass of RIPEMD160 before pushing it to the
// script
paymentHash160 := ripemd160(paymentHash)
decodedRefundAddress, err := btcutil.DecodeAddress(refundAddress, network)
decodedRefundAddress, err := btcutilw.DecodeAddress(refundAddress, network)
if err != nil {
return nil, fmt.Errorf("refund address is invalid: %w", err)
}