mirror of
https://github.com/muun/recovery.git
synced 2025-11-11 14:30:19 -05:00
Release v2.2.0
This commit is contained in:
11
vendor/github.com/muun/libwallet/swaps/swaps.go
generated
vendored
11
vendor/github.com/muun/libwallet/swaps/swaps.go
generated
vendored
@@ -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
|
||||
|
||||
3
vendor/github.com/muun/libwallet/swaps/v1.go
generated
vendored
3
vendor/github.com/muun/libwallet/swaps/v1.go
generated
vendored
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user