fix watch only dashboard

This commit is contained in:
Kukks
2023-03-15 09:46:28 +01:00
parent 29ded15b7c
commit 2f43abcdf4
2 changed files with 12 additions and 7 deletions

View File

@@ -149,7 +149,8 @@ public class Smartifier
utxoLabels.TryGetValue(coin.OutPoint, out var labels);
var unsmartTx = await CachedTransactions[coin.OutPoint.Hash];
var pubKey = DerivationScheme.GetChild(coin.KeyPath).GetExtPubKeys().First().PubKey;
var kp = _accountKeyPath.Derive(coin.KeyPath).KeyPath;
//if there is no account key path, it most likely means this is a watch only wallet. Fake the key path
var kp = _accountKeyPath?.Derive(coin.KeyPath).KeyPath ?? new KeyPath(0);
var hdPubKey = new HdPubKey(pubKey, kp, new SmartLabel(labels.labels ?? new HashSet<string>()),
current == 1 ? KeyState.Clean : KeyState.Used);