From b470ce2dad43aae27e7646fa50cd5f69cc9dadf7 Mon Sep 17 00:00:00 2001 From: Kukks Date: Fri, 17 Apr 2020 10:46:43 +0200 Subject: [PATCH] fix p2sh test error codes --- BTCPayServer.Tests/PayJoinTests.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BTCPayServer.Tests/PayJoinTests.cs b/BTCPayServer.Tests/PayJoinTests.cs index deb0b9ff3..68f0368ae 100644 --- a/BTCPayServer.Tests/PayJoinTests.cs +++ b/BTCPayServer.Tests/PayJoinTests.cs @@ -141,8 +141,14 @@ namespace BTCPayServer.Tests var receiverCoin = await receiverUser.ReceiveUTXO(Money.Satoshis(810), network); var clientShouldError = unsupportedFormats.Contains(senderAddressType); - var errorCode = ( unsupportedFormats.Contains( receiverAddressType) || receiverAddressType != senderAddressType)? "unsupported-inputs" : null; - + string errorCode = null; + if (unsupportedFormats.Contains(receiverAddressType)) + { + errorCode = "unsupported-inputs"; + }else if (receiverAddressType != senderAddressType) + { + errorCode = "out-of-utxos"; + } var invoice = receiverUser.BitPay.CreateInvoice(new Invoice() {Price = 50000, Currency = "sats", FullNotifications = true}); var invoiceAddress = BitcoinAddress.Create(invoice.BitcoinAddress, cashCow.Network);