mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Fix rate in the WalletSend
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<Version>1.0.2.75</Version>
|
<Version>1.0.2.76</Version>
|
||||||
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace BTCPayServer.Controllers
|
|||||||
var storeData = store.GetStoreBlob();
|
var storeData = store.GetStoreBlob();
|
||||||
var rateRules = store.GetStoreBlob().GetRateRules(_NetworkProvider);
|
var rateRules = store.GetStoreBlob().GetRateRules(_NetworkProvider);
|
||||||
rateRules.GlobalMultiplier = 1.0m;
|
rateRules.GlobalMultiplier = 1.0m;
|
||||||
var currencyPair = new Rating.CurrencyPair(paymentMethod.PaymentId.CryptoCode, storeData.DefaultLang ?? "USD");
|
var currencyPair = new Rating.CurrencyPair(paymentMethod.PaymentId.CryptoCode, GetCurrencyCode(storeData.DefaultLang) ?? "USD");
|
||||||
WalletModel model = new WalletModel();
|
WalletModel model = new WalletModel();
|
||||||
model.ServerUrl = GetLedgerWebsocketUrl(this.HttpContext, walletId.CryptoCode, paymentMethod.DerivationStrategyBase);
|
model.ServerUrl = GetLedgerWebsocketUrl(this.HttpContext, walletId.CryptoCode, paymentMethod.DerivationStrategyBase);
|
||||||
model.CryptoCurrency = walletId.CryptoCode;
|
model.CryptoCurrency = walletId.CryptoCode;
|
||||||
@@ -177,6 +177,19 @@ namespace BTCPayServer.Controllers
|
|||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetCurrencyCode(string defaultLang)
|
||||||
|
{
|
||||||
|
if (defaultLang == null)
|
||||||
|
return null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var ri = new RegionInfo(defaultLang);
|
||||||
|
return ri.ISOCurrencySymbol;
|
||||||
|
}
|
||||||
|
catch(ArgumentException) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private DerivationStrategy GetPaymentMethod(WalletId walletId, StoreData store)
|
private DerivationStrategy GetPaymentMethod(WalletId walletId, StoreData store)
|
||||||
{
|
{
|
||||||
if (store == null || !store.HasClaim(Policies.CanModifyStoreSettings.Key))
|
if (store == null || !store.HasClaim(Policies.CanModifyStoreSettings.Key))
|
||||||
|
|||||||
Reference in New Issue
Block a user