From 6069e8f083c6fffa21f2985a24da109a8997baac Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 1 Oct 2020 20:15:46 +0900 Subject: [PATCH] Fix test fail and warnings --- BTCPayServer.Tests/UnitTest1.cs | 2 +- .../Altcoins/Ethereum/UI/EthereumLikeStoreController.cs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index 5973056fb..fe8be9c61 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -764,7 +764,7 @@ namespace BTCPayServer.Tests user.SetNetworkFeeMode(NetworkFeeMode.Never); await user.ModifyStoreAsync(model => model.SpeedPolicy = SpeedPolicy.HighSpeed); var invoice = await user.BitPay.CreateInvoiceAsync(new Invoice(0.0001m, "BTC")); - await tester.WaitForEvent(async () => + await tester.WaitForEvent(async () => { await tester.ExplorerNode.SendToAddressAsync( BitcoinAddress.Create(invoice.BitcoinAddress, Network.RegTest), Money.Coins(0.00005m)); diff --git a/BTCPayServer/Services/Altcoins/Ethereum/UI/EthereumLikeStoreController.cs b/BTCPayServer/Services/Altcoins/Ethereum/UI/EthereumLikeStoreController.cs index b462431b9..e19c565fd 100644 --- a/BTCPayServer/Services/Altcoins/Ethereum/UI/EthereumLikeStoreController.cs +++ b/BTCPayServer/Services/Altcoins/Ethereum/UI/EthereumLikeStoreController.cs @@ -14,7 +14,6 @@ using BTCPayServer.Services.Altcoins.Ethereum.Payments; using BTCPayServer.Services.Stores; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore.Internal; using NBitcoin; using Nethereum.HdWallet; using Nethereum.Hex.HexConvertors.Extensions; @@ -189,13 +188,11 @@ namespace BTCPayServer.Services.Altcoins.Ethereum.UI int index = -1; if (wallet != null) { - index = wallet.GetAddresses(1000) - .IndexOf(viewModel.AddressCheck); + index = Array.IndexOf(wallet.GetAddresses(1000), viewModel.AddressCheck); } else if (publicWallet != null) { - index = publicWallet.GetAddresses(1000) - .IndexOf(viewModel.AddressCheck); + index = Array.IndexOf(publicWallet.GetAddresses(1000), viewModel.AddressCheck); } if (viewModel.AddressCheckLastUsed && index > -1)