rejectSession method
Reject the session.
Implementation
Future rejectSession({String? message}) async {
if (connected) {
throw WalletConnectException('Session currently connected');
}
message = message ?? 'Session Rejected';
final response = JsonRpcResponse(
id: session.handshakeId,
error: {
'code': -32000,
'message': message,
},
);
await _sendResponse(response);
session.connected = false;
// Notify listeners
_eventBus.fire(Event<String>('disconnect', message));
}