From 24007f1515756f0517a2ae15854e0cc1aacad99e Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 18 Dec 2017 08:56:27 +0900 Subject: [PATCH] Fix: Forgot to pass in the Rate field to the invoice DTO --- BTCPayServer.Tests/UnitTest1.cs | 3 ++- BTCPayServer/BTCPayServer.csproj | 2 +- BTCPayServer/EventAggregator.cs | 1 - BTCPayServer/Services/Invoices/InvoiceEntity.cs | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index 20e22e4ad..333bf02ce 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -385,7 +385,7 @@ namespace BTCPayServer.Tests Assert.Equal(Money.Zero, localInvoice.BtcDue); Assert.Equal(localInvoice.BitcoinAddress, invoiceAddress.ToString()); //no new address generated Assert.True(IsMapped(localInvoice, ctx)); - Assert.Equal(false, (bool)((JValue)localInvoice.ExceptionStatus).Value); + Assert.False((bool)((JValue)localInvoice.ExceptionStatus).Value); }); cashCow.Generate(1); //The user has medium speed settings, so 1 conf is enough to be confirmed @@ -404,6 +404,7 @@ namespace BTCPayServer.Tests tester.SimulateCallback(); var localInvoice = user.BitPay.GetInvoice(invoice.Id, Facade.Merchant); Assert.Equal("complete", localInvoice.Status); + Assert.NotEqual(0.0, localInvoice.Rate); }); invoice = user.BitPay.CreateInvoice(new Invoice() diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 18bcd6a32..3e53ab835 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -2,7 +2,7 @@ Exe netcoreapp2.0 - 1.0.0.47 + 1.0.0.48 diff --git a/BTCPayServer/EventAggregator.cs b/BTCPayServer/EventAggregator.cs index e9ff509ad..6510c9049 100644 --- a/BTCPayServer/EventAggregator.cs +++ b/BTCPayServer/EventAggregator.cs @@ -18,7 +18,6 @@ namespace BTCPayServer { private EventAggregator aggregator; Type t; - Action act; public Subscription(EventAggregator aggregator, Type t) { this.aggregator = aggregator; diff --git a/BTCPayServer/Services/Invoices/InvoiceEntity.cs b/BTCPayServer/Services/Invoices/InvoiceEntity.cs index 10a7cd151..f598f1efb 100644 --- a/BTCPayServer/Services/Invoices/InvoiceEntity.cs +++ b/BTCPayServer/Services/Invoices/InvoiceEntity.cs @@ -290,7 +290,8 @@ namespace BTCPayServer.Services.Invoices Status = Status, Url = ServerUrl.WithTrailingSlash() + "invoice?id=" + Id, Currency = ProductInformation.Currency, - Flags = new Flags() { Refundable = Refundable } + Flags = new Flags() { Refundable = Refundable }, + Rate = Rate }; Populate(ProductInformation, dto); Populate(BuyerInformation, dto);