Remove obsolete store hints

This commit is contained in:
Dennis Reimann 2022-01-20 17:39:23 +01:00
parent c2fc099439
commit 10adb23e71
No known key found for this signature in database
GPG key ID: 5009E1797F03F8D0
5 changed files with 0 additions and 29 deletions

View file

@ -158,11 +158,7 @@ namespace BTCPayServer.Controllers
switch (command)
{
case "save":
var storeBlob = store.GetStoreBlob();
storeBlob.Hints.Lightning = false;
var lnurl = new PaymentMethodId(vm.CryptoCode, PaymentTypes.LNURLPay);
store.SetStoreBlob(storeBlob);
store.SetSupportedPaymentMethod(paymentMethodId, paymentMethod);
store.SetSupportedPaymentMethod(lnurl, new LNURLPaySupportedPaymentMethod()
{

View file

@ -163,7 +163,6 @@ namespace BTCPayServer.Controllers
await wallet.TrackAsync(strategy.AccountDerivation);
store.SetSupportedPaymentMethod(paymentMethodId, strategy);
storeBlob.SetExcluded(paymentMethodId, false);
storeBlob.Hints.Wallet = false;
storeBlob.PayJoinEnabled = strategy.IsHotWallet && !(vm.SetupRequest?.PayJoinEnabled is false);
store.SetStoreBlob(storeBlob);
}

View file

@ -170,8 +170,6 @@ namespace BTCPayServer.Data
public EmailSettings EmailSettings { get; set; }
public bool PayJoinEnabled { get; set; }
public StoreHints Hints { get; set; }
[JsonExtensionData]
public IDictionary<string, JToken> AdditionalData { get; set; } = new Dictionary<string, JToken>();
@ -180,12 +178,6 @@ namespace BTCPayServer.Data
[JsonConverter(typeof(TimeSpanJsonConverter.Days))]
public TimeSpan RefundBOLT11Expiration { get; set; }
public class StoreHints
{
public bool Wallet { get; set; }
public bool Lightning { get; set; }
}
public IPaymentFilter GetExcludedPaymentMethods()
{
#pragma warning disable CS0618 // Type or member is obsolete

View file

@ -50,9 +50,6 @@ namespace BTCPayServer.Data
var result = storeData.StoreBlob == null ? new StoreBlob() : new Serializer(null).ToObject<StoreBlob>(Encoding.UTF8.GetString(storeData.StoreBlob));
if (result.PreferredExchange == null)
result.PreferredExchange = CoinGeckoRateProvider.CoinGeckoName;
if (result.Hints == null)
result.Hints = new StoreBlob.StoreHints();
return result;
}

View file

@ -152,17 +152,6 @@ namespace BTCPayServer.Services.Stores
}
}
private void SetNewStoreHints(ref StoreData storeData)
{
var blob = storeData.GetStoreBlob();
blob.Hints = new Data.StoreBlob.StoreHints
{
Wallet = true,
Lightning = true
};
storeData.SetStoreBlob(blob);
}
public async Task CreateStore(string ownerId, StoreData storeData)
{
if (!string.IsNullOrEmpty(storeData.Id))
@ -179,8 +168,6 @@ namespace BTCPayServer.Services.Stores
Role = StoreRoles.Owner,
};
SetNewStoreHints(ref storeData);
ctx.Add(storeData);
ctx.Add(userStore);
await ctx.SaveChangesAsync();