Limit the number of time the wallet need to export the xpub

This commit is contained in:
nicolas.dorier
2018-12-26 15:04:11 +09:00
parent caa6978d80
commit 81c9ce7284
3 changed files with 38 additions and 8 deletions

View File

@@ -372,11 +372,11 @@ namespace BTCPayServer.Data
if (keyPath == null)
WalletKeyPathRoots.Remove(paymentMethodId.ToString());
else
WalletKeyPathRoots.AddOrReplace(paymentMethodId.ToString(), keyPath.ToString());
WalletKeyPathRoots.AddOrReplace(paymentMethodId.ToString().ToLowerInvariant(), keyPath.ToString());
}
public KeyPath GetWalletKeyPathRoot(PaymentMethodId paymentMethodId)
{
if (WalletKeyPathRoots.TryGetValue(paymentMethodId.ToString(), out var k))
if (WalletKeyPathRoots.TryGetValue(paymentMethodId.ToString().ToLowerInvariant(), out var k))
return KeyPath.Parse(k);
return null;
}