connectNode method

Future<NetworkParams?> connectNode(
  1. Keyring keyringStorage,
  2. List<NetworkParams> nodes
)

connect to a list of nodes, return null if connect failed.

Implementation

Future<NetworkParams?> connectNode(
    Keyring keyringStorage, List<NetworkParams> nodes) async {
  _connectedNode = null;
  final NetworkParams? res = await service.webView!.connectNode(nodes);
  if (res != null) {
    _connectedNode = res;

    // update indices of keyPairs after connect
    keyring.updateIndicesMap(keyringStorage);
  }
  return res;
}