simulateTransaction method
Future<CallResult>
simulateTransaction(
{ - required String networkUrl,
- required String privateKey,
- 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);
}
}