addSignatureAndSend method

Future<Map?> addSignatureAndSend(
  1. String address,
  2. dynamic signed,
  3. dynamic onStatusChange(
    1. String
    )
)

Implementation

Future<Map?> addSignatureAndSend(
  String address,
  signed,
  Function(String) onStatusChange,
) async {
  final msgId =
      "onStatusChange${serviceRoot.webView!.getEvalJavascriptUID()}";
  serviceRoot.webView!.addMsgHandler(msgId, onStatusChange);

  final dynamic res = await serviceRoot.webView!.evalJavascript(
      'keyring.addSignatureAndSend(api, "$address", "$signed")');
  serviceRoot.webView!.removeMsgHandler(msgId);

  return res;
}