UI: Store setup finetuning (#2087)

* UI: Store setup finetuning

Incorporate @dstrukt's improvement feedback from [this comment](https://github.com/btcpayserver/btcpayserver/pull/2011#issuecomment-735909927).

* Clean up and fix test
This commit is contained in:
Dennis Reimann
2020-12-02 07:45:00 +01:00
committed by GitHub
parent 6714eb9f7f
commit 7e50267cb0
5 changed files with 33 additions and 79 deletions

View File

@@ -996,29 +996,5 @@ namespace BTCPayServer.Controllers
storeId = CurrentStore.Id
});
}
[HttpPost]
[Route("{storeId}/dismissHint")]
[IgnoreAntiforgeryToken]
public async Task<IActionResult> DismissHint(string id)
{
var blob = CurrentStore.GetStoreBlob();
if (id == "Wallet" || id == "Lightning")
{
try
{
var prop = blob.Hints.GetType().GetProperty(id);
prop.SetValue(blob.Hints, false);
}
// disregard parse errors
catch { }
if (CurrentStore.SetStoreBlob(blob))
{
await _Repo.UpdateStore(CurrentStore);
}
}
return Content("ack");
}
}
}