set method

  1. @override
Future<void> set(
  1. String topic,
  2. JsonRpcRequest value, {
  3. String? chainId,
})
override

Implementation

@override
Future<void> set(
  String topic,
  JsonRpcRequest value, {
  String? chainId,
}) async {
  _checkInitialized();

  final JsonRpcRecord record = JsonRpcRecord(
    value.id,
    topic,
    value.method,
    value.params,
    chainId: chainId,
  );

  history[value.id.toString()] = record.toJson();
  created.broadcast(HistoryEvent(record));
  await persist();
}