pushSignMessage function

Future<String> pushSignMessage(
  1. BuildContext context,
  2. String message,
  3. UpAccount account,
  4. UniPassConfig config,
)

Implementation

Future<String> pushSignMessage(BuildContext context, String message, UpAccount account, UniPassConfig config) async {
  final String url = getWalletUrl(MessageType.upSignMessage, config.domain, config.protocol);
  print("[pushSignMessage: $url]");
  Completer<String> completer = Completer<String>();
  Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => SignMessagePage(
        signFuture: completer,
        url: url,
        from: account.address,
        message: message,
        appSetting: config.appSetting,
      ),
    ),
  );

  return completer.future;
}