getNamespaceFromChain static method
Gets the namespace string id from the chainId If the chain id is not valid, then it returns the chain id
Implementation
static String getNamespaceFromChain(String chainId) {
if (isValidChainId(chainId)) {
return chainId.split(':')[0];
}
return chainId;
}