getChainsFromAccounts static method

List<String> getChainsFromAccounts(
  1. List<String> accounts
)

Gets all unique chains from the provided list of accounts This function assumes that all accounts are valid

Implementation

static List<String> getChainsFromAccounts(List<String> accounts) {
  Set<String> chains = {};
  for (var account in accounts) {
    chains.add(
      getChainFromAccount(
        account,
      ),
    );
  }

  return chains.toList();
}