simulateTransaction method

  1. @override
Future<CallResult> simulateTransaction({
  1. required String networkUrl,
  2. required String privateKey,
  3. required dynamic transactionRequest,
})
override

Implementation

@override
Future<CallResult> simulateTransaction(
    {required String networkUrl,
    required String privateKey,
    required transactionRequest}) async {
  var callResultStr = await promiseToFuture(js_wallet.simulateTransaction(
      privateKey, _enrichNetworkUrl(networkUrl), transactionRequest));
  var callResultJson = jsonDecode(callResultStr);
  try {
    return CallResult.fromJson(callResultJson);
  } catch (err) {
    return Future.error(err);
  }
}