isValidChains function
Implementation
ErrorObject? isValidChains(
String key,
List<String> chains,
String context,
) {
ErrorObject? error;
chains.forEach((chain) {
if (error != null) return;
if (!isValidChainId(chain) || !chain.contains(key)) {
error = getSdkError(
SdkErrorKey.UNSUPPORTED_CHAINS,
context:
'$context, chain $chain should be a string and conform to "namespace:chainId" format',
);
}
});
return error;
}