mirror of
https://github.com/muun/recovery.git
synced 2025-11-13 15:21:37 -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
|
||||
|
||||
Reference in New Issue
Block a user