Fix: Forgot to pass in the Rate field to the invoice DTO

This commit is contained in:
nicolas.dorier 2017-12-18 08:56:27 +09:00
parent 3d7445f359
commit 24007f1515
4 changed files with 5 additions and 4 deletions

View file

@ -385,7 +385,7 @@ namespace BTCPayServer.Tests
Assert.Equal(Money.Zero, localInvoice.BtcDue); Assert.Equal(Money.Zero, localInvoice.BtcDue);
Assert.Equal(localInvoice.BitcoinAddress, invoiceAddress.ToString()); //no new address generated Assert.Equal(localInvoice.BitcoinAddress, invoiceAddress.ToString()); //no new address generated
Assert.True(IsMapped(localInvoice, ctx)); 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 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(); tester.SimulateCallback();
var localInvoice = user.BitPay.GetInvoice(invoice.Id, Facade.Merchant); var localInvoice = user.BitPay.GetInvoice(invoice.Id, Facade.Merchant);
Assert.Equal("complete", localInvoice.Status); Assert.Equal("complete", localInvoice.Status);
Assert.NotEqual(0.0, localInvoice.Rate);
}); });
invoice = user.BitPay.CreateInvoice(new Invoice() invoice = user.BitPay.CreateInvoice(new Invoice()

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<Version>1.0.0.47</Version> <Version>1.0.0.48</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Build\dockerfiles\**" /> <Compile Remove="Build\dockerfiles\**" />

View file

@ -18,7 +18,6 @@ namespace BTCPayServer
{ {
private EventAggregator aggregator; private EventAggregator aggregator;
Type t; Type t;
Action<object> act;
public Subscription(EventAggregator aggregator, Type t) public Subscription(EventAggregator aggregator, Type t)
{ {
this.aggregator = aggregator; this.aggregator = aggregator;

View file

@ -290,7 +290,8 @@ namespace BTCPayServer.Services.Invoices
Status = Status, Status = Status,
Url = ServerUrl.WithTrailingSlash() + "invoice?id=" + Id, Url = ServerUrl.WithTrailingSlash() + "invoice?id=" + Id,
Currency = ProductInformation.Currency, Currency = ProductInformation.Currency,
Flags = new Flags() { Refundable = Refundable } Flags = new Flags() { Refundable = Refundable },
Rate = Rate
}; };
Populate(ProductInformation, dto); Populate(ProductInformation, dto);
Populate(BuyerInformation, dto); Populate(BuyerInformation, dto);