If shitcoins are removed, dont try to hash its cryptocode for nbx (#5373)

This commit is contained in:
Andrew Camilleri 2023-10-06 09:06:17 +02:00 committed by GitHub
parent 076c20a3b7
commit 0cf6d39f02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ namespace BTCPayServer.Data
if (index == -1)
return PaymentMethodId.Parse("BTC");
/////////////////////////
return PaymentMethodId.Parse(addressInvoiceData.Address.Substring(index + 1));
return PaymentMethodId.TryParse(addressInvoiceData.Address.Substring(index + 1));
}
#pragma warning restore CS0618
}

View file

@ -584,7 +584,7 @@ namespace BTCPayServer.Services.Invoices
entity.RefundMail = invoice.CustomerEmail;
if (invoice.AddressInvoices != null)
{
entity.AvailableAddressHashes = invoice.AddressInvoices.Select(a => a.GetAddress() + a.GetPaymentMethodId().ToString()).ToHashSet();
entity.AvailableAddressHashes = invoice.AddressInvoices.Select(a => a.GetAddress() + a.GetPaymentMethodId()).ToHashSet();
}
if (invoice.Events != null)
{