mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Fix legacy rate not being correct for alt only payment
This commit is contained in:
@@ -436,6 +436,7 @@ namespace BTCPayServer.Tests
|
|||||||
|
|
||||||
// Despite it is called BitcoinAddress it should be LTC because BTC is not available
|
// Despite it is called BitcoinAddress it should be LTC because BTC is not available
|
||||||
Assert.Null(invoice.BitcoinAddress);
|
Assert.Null(invoice.BitcoinAddress);
|
||||||
|
Assert.NotEqual(1.0, invoice.Rate);
|
||||||
Assert.NotEqual(invoice.BtcDue, invoice.CryptoInfo[0].Due); // Should be BTC rate
|
Assert.NotEqual(invoice.BtcDue, invoice.CryptoInfo[0].Due); // Should be BTC rate
|
||||||
cashCow.SendToAddress(invoiceAddress, invoice.CryptoInfo[0].Due);
|
cashCow.SendToAddress(invoiceAddress, invoice.CryptoInfo[0].Due);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<Version>1.0.0.79</Version>
|
<Version>1.0.0.80</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Build\dockerfiles\**" />
|
<Compile Remove="Build\dockerfiles\**" />
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ namespace BTCPayServer.Controllers
|
|||||||
if (feeProvider != null && rateProvider != null)
|
if (feeProvider != null && rateProvider != null)
|
||||||
{
|
{
|
||||||
var gettingFee = feeProvider.GetFeeRateAsync();
|
var gettingFee = feeProvider.GetFeeRateAsync();
|
||||||
var gettingRate = rateProvider.GetRateAsync("BTC");
|
var gettingRate = rateProvider.GetRateAsync(invoice.Currency);
|
||||||
entity.TxFee = GetTxFee(storeBlob, await gettingFee);
|
entity.TxFee = GetTxFee(storeBlob, await gettingFee);
|
||||||
entity.Rate = await gettingRate;
|
entity.Rate = await gettingRate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user