mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-01 00:59:15 +01:00
Add Tests Add Index, XPub to payment data Add Note on local ETH node Fix Sync Summary and Race Condition
20 lines
711 B
C#
20 lines
711 B
C#
#if ALTCOINS
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace BTCPayServer
|
|
{
|
|
public static class EthereumExtensions
|
|
{
|
|
|
|
public static IEnumerable<string> GetAllEthereumSubChains(this BTCPayNetworkProvider networkProvider, BTCPayNetworkProvider unfiltered)
|
|
{
|
|
var ethBased = networkProvider.GetAll().OfType<EthereumBTCPayNetwork>();
|
|
var chainId = ethBased.Select(network => network.ChainId).Distinct();
|
|
return unfiltered.GetAll().OfType<EthereumBTCPayNetwork>()
|
|
.Where(network => chainId.Contains(network.ChainId))
|
|
.Select(network => network.CryptoCode.ToUpperInvariant());
|
|
}
|
|
}
|
|
}
|
|
#endif
|