queryNetworkProps method

Future<Map?> queryNetworkProps()

Implementation

Future<Map?> queryNetworkProps() async {
  // fetch network info
  List res = await serviceRoot.webView!.evalJavascript(
      'Promise.all([settings.getNetworkProperties(api), api.rpc.system.chain()])');
  if (res[0] == null || res[1] == null) {
    return null;
  }

  final Map props = res[0];
  props['name'] = res[1];
  return props;
}