connect method

  1. @override
Future<Map<String, dynamic>> connect()

Requests access to the Wallet for the dApp, may be rejected or approved. Every access to the extension begins with a connect request, which if approved by the user, allows the dApp to follow-up with other requests.

Implementation

@override
Future<Map<String, dynamic>> connect() async {
  var c = Completer<Map<String, dynamic>>();
  promiseToFuture(algosigner.connect())
      .then((value) => c.complete(Map<String, dynamic>.from(convert(value))))
      .onError((error, stackTrace) => c.completeError(_handleError(error)));

  return c.future;
}