From 58b994e043584cdb0deb6e8d2a89310e8a0aead4 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 16 May 2018 10:40:25 +0900 Subject: [PATCH] fix tests --- BTCPayServer/Services/Invoices/InvoiceEntity.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/BTCPayServer/Services/Invoices/InvoiceEntity.cs b/BTCPayServer/Services/Invoices/InvoiceEntity.cs index c2264e275..27204ed0f 100644 --- a/BTCPayServer/Services/Invoices/InvoiceEntity.cs +++ b/BTCPayServer/Services/Invoices/InvoiceEntity.cs @@ -415,14 +415,15 @@ namespace BTCPayServer.Services.Invoices #pragma warning restore CS0618 dto.CryptoInfo.Add(cryptoInfo); - dto.PaymentSubtotals.Add(cryptoCode, subtotalPrice.Satoshi); - dto.PaymentTotals.Add(cryptoCode, accounting.TotalDue.Satoshi); - dto.SupportedTransactionCurrencies.Add(cryptoCode, new InvoiceSupportedTransactionCurrency() + dto.PaymentCodes.Add(paymentId.ToString(), cryptoInfo.PaymentUrls); + dto.PaymentSubtotals.Add(paymentId.ToString(), subtotalPrice.Satoshi); + dto.PaymentTotals.Add(paymentId.ToString(), accounting.TotalDue.Satoshi); + dto.SupportedTransactionCurrencies.TryAdd(cryptoCode, new InvoiceSupportedTransactionCurrency() { Enabled = true }); - dto.Addresses.Add(cryptoCode, address); - dto.ExchangeRates.Add(cryptoCode, exrates); + dto.Addresses.Add(paymentId.ToString(), address); + dto.ExchangeRates.TryAdd(cryptoCode, exrates); } //dto.AmountPaid dto.MinerFees & dto.TransactionCurrency are not supported by btcpayserver as we have multi currency payment support per invoice