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

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