We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 023bfd4 commit 71a5dafCopy full SHA for 71a5daf
wallet/wallet.go
@@ -4091,7 +4091,15 @@ func (w *Wallet) DeriveFromKeyPath(scope waddrmgr.KeyScope,
4091
return fmt.Errorf("error deriving private key: %w", err)
4092
}
4093
4094
- privKey, err = addr.(waddrmgr.ManagedPubKeyAddress).PrivKey()
+ mpka, ok := addr.(waddrmgr.ManagedPubKeyAddress)
4095
+ if !ok {
4096
+ err := fmt.Errorf("managed address type for %v is "+
4097
+ "`%T` but want waddrmgr.ManagedPubKeyAddress",
4098
+ addr, addr)
4099
+
4100
+ return err
4101
+ }
4102
+ privKey, err = mpka.PrivKey()
4103
4104
return err
4105
})
0 commit comments