rejectRequest method

Future rejectRequest({
  1. required int id,
  2. String? errorMessage,
})

Rejects a pending request specifing the error https://docs.walletconnect.com/client-api#reject-call-request

Implementation

Future rejectRequest({
  required int id,
  String? errorMessage,
}) async {
  final response = JsonRpcResponse(
    id: id,
    error: {'error': errorMessage},
  );

  return _sendResponse(response);
}