mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 17:36:59 +01:00
Remove obsolete store hints
This commit is contained in:
parent
c2fc099439
commit
10adb23e71
5 changed files with 0 additions and 29 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue