whole_func_string: function getChainDataById(storage, chainId) {
      if (storage[GET_CHAIN_METHOD]) {
          return storage[GET_CHAIN_METHOD](chainId);
      }
      return storage[chainId];
  }
func_code_string: function getChainDataById(storage, chainId) {
      if (storage[GET_CHAIN_METHOD]) {
          return storage[GET_CHAIN_METHOD](chainId);
      }
      return storage[chainId];
  }
func_documentation_string: Gets the chain data from storage by chain id
  @param storage
  @param chainId