diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml
index 32f28ca96..f0d4f4c5b 100644
--- a/BTCPayServer.Tests/docker-compose.yml
+++ b/BTCPayServer.Tests/docker-compose.yml
@@ -37,7 +37,7 @@ services:
- postgres
nbxplorer:
- image: nicolasdorier/nbxplorer:1.0.0.53
+ image: nicolasdorier/nbxplorer:1.0.0.54
ports:
- "32838:32838"
expose:
diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj
index 992aa5e0a..3b53b5aca 100644
--- a/BTCPayServer/BTCPayServer.csproj
+++ b/BTCPayServer/BTCPayServer.csproj
@@ -2,7 +2,7 @@
Exe
netcoreapp2.0
- 1.0.0.68
+ 1.0.0.69
diff --git a/BTCPayServer/Services/Invoices/InvoiceEntity.cs b/BTCPayServer/Services/Invoices/InvoiceEntity.cs
index df606413e..614117158 100644
--- a/BTCPayServer/Services/Invoices/InvoiceEntity.cs
+++ b/BTCPayServer/Services/Invoices/InvoiceEntity.cs
@@ -410,23 +410,27 @@ namespace BTCPayServer.Services.Invoices
public Dictionary GetCryptoData(BTCPayNetworkProvider networkProvider, bool alwaysIncludeBTC = false)
{
Dictionary rates = new Dictionary();
+ bool btcAdded = false;
var serializer = new Serializer(Dummy);
#pragma warning disable CS0618
// Legacy
if (alwaysIncludeBTC)
{
var btcNetwork = networkProvider?.GetNetwork("BTC");
- rates.TryAdd("BTC", new CryptoData() { ParentEntity = this, Rate = Rate, CryptoCode = "BTC", TxFee = TxFee, FeeRate = new FeeRate(TxFee, 100), DepositAddress = DepositAddress, Network = btcNetwork });
+ rates.Add("BTC", new CryptoData() { ParentEntity = this, Rate = Rate, CryptoCode = "BTC", TxFee = TxFee, FeeRate = new FeeRate(TxFee, 100), DepositAddress = DepositAddress, Network = btcNetwork });
+ btcAdded = true;
}
if (CryptoData != null)
{
foreach (var prop in CryptoData.Properties())
{
+ if (prop.Name == "BTC" && btcAdded)
+ continue;
var r = serializer.ToObject(prop.Value.ToString());
r.CryptoCode = prop.Name;
r.ParentEntity = this;
r.Network = networkProvider?.GetNetwork(r.CryptoCode);
- rates.TryAdd(r.CryptoCode, r);
+ rates.Add(r.CryptoCode, r);
}
}
#pragma warning restore CS0618