Minor refactor

This commit is contained in:
nicolas.dorier 2022-08-03 18:36:25 +09:00
parent a753459a6d
commit 14cb65eb6a
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -309,11 +309,10 @@ namespace BTCPayServer.Services.Stores
.FirstOrDefaultAsync();
if (hook is null)
return;
var currentBlob = hook.GetBlob();
if (string.IsNullOrEmpty(webhookBlob.Secret))
{
webhookBlob.Secret = currentBlob.Secret;
webhookBlob.Secret = hook.GetBlob().Secret;
}
hook.SetBlob(webhookBlob);
await ctx.SaveChangesAsync();