Fix test fail and warnings

This commit is contained in:
nicolas.dorier 2020-10-01 20:15:46 +09:00
parent 30ea223d09
commit 6069e8f083
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 3 additions and 6 deletions

View file

@ -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<InvoiceNewAddressEvent>(async () =>
await tester.WaitForEvent<InvoiceNewPaymentDetailsEvent>(async () =>
{
await tester.ExplorerNode.SendToAddressAsync(
BitcoinAddress.Create(invoice.BitcoinAddress, Network.RegTest), Money.Coins(0.00005m));

View file

@ -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)