connect method

Future<SessionStatus> connect({
  1. int? chainId,
  2. OnDisplayUriCallback? onDisplayUri,
})

Create a new session.

Implementation

Future<SessionStatus> connect(
    {int? chainId, OnDisplayUriCallback? onDisplayUri}) async {
  if (connected) {
    onDisplayUri?.call(session.toUri());
    return SessionStatus(
      chainId: session.chainId,
      accounts: session.accounts,
    );
  }

  return await createSession(chainId: chainId, onDisplayUri: onDisplayUri);
}