don't crash if the user unset his extpubkey

This commit is contained in:
nicolas.dorier 2017-11-01 01:06:59 -07:00
parent ca85095273
commit 73c44f8726

View file

@ -190,9 +190,12 @@ namespace BTCPayServer.Controllers
needUpdate = true;
try
{
var strategy = ParseDerivationStrategy(model.DerivationScheme);
await _Wallet.TrackAsync(strategy);
await _CallbackController.RegisterCallbackUriAsync(strategy, Request);
if (!string.IsNullOrEmpty(model.DerivationScheme))
{
var strategy = ParseDerivationStrategy(model.DerivationScheme);
await _Wallet.TrackAsync(strategy);
await _CallbackController.RegisterCallbackUriAsync(strategy, Request);
}
store.DerivationStrategy = model.DerivationScheme;
}
catch