sendTx method

Future<Map?> sendTx(
  1. String chainFrom,
  2. Map txInfo,
  3. String password,
  4. String msgId,
  5. Map keyring,
)

Implementation

Future<Map?> sendTx(String chainFrom, Map txInfo, String password,
    String msgId, Map keyring) async {
  assert(_runner != null, 'bridge not init');
  final String pairs = jsonEncode(keyring);
  final dynamic res = await _runner?.evalJavascript(
      'bridge.sendTx("$chainFrom", ${jsonEncode(txInfo)},"$password","$msgId",$pairs)');
  if (res?['error'] != null) {
    throw Exception(res?['error']);
  }
  return res;
}