Show success message when derivation scheme is updated

This commit is contained in:
nicolas.dorier
2019-10-21 13:24:13 +09:00
parent 22b05500f1
commit f3461bfbe6

View File

@@ -272,13 +272,15 @@ namespace BTCPayServer.Controllers
} }
await _Repo.UpdateStore(store); await _Repo.UpdateStore(store);
if (oldConfig != vm.Config)
StatusMessage = $"Derivation settings for {network.CryptoCode} has been modified.";
if (willBeExcluded != wasExcluded) if (willBeExcluded != wasExcluded)
{ {
var label = willBeExcluded ? "disabled" : "enabled"; var label = willBeExcluded ? "disabled" : "enabled";
StatusMessage = $"On-Chain payments for {network.CryptoCode} has been {label}."; StatusMessage = $"On-Chain payments for {network.CryptoCode} has been {label}.";
} }
else
{
StatusMessage = $"Derivation settings for {network.CryptoCode} has been modified.";
}
return RedirectToAction(nameof(UpdateStore), new {storeId = storeId}); return RedirectToAction(nameof(UpdateStore), new {storeId = storeId});
} }
else if (!string.IsNullOrEmpty(vm.HintAddress)) else if (!string.IsNullOrEmpty(vm.HintAddress))