getTransaction method

  1. @override
Future<Transaction?> getTransaction(
  1. String hash
)
override

Get single transaction by its id. Return Transaction if found or throw error

Implementation

@override
Future<Transaction?> getTransaction(String hash) async {
  if (_disposed) throw TransportCallAfterDisposeError();

  final res = await transport.getTransaction(hash: hash);
  if (res == null) return null;
  return Transaction.fromJson(jsonDecode(res));
}