reject method

  1. @override
Future<void> reject(
  1. SessionRejectParams params
)
override

Implementation

@override
Future<void> reject(SessionRejectParams params) async {
  _isInitialized();
  await _isValidReject(params);
  final proposal = client.proposal.get(params.id.toString());
  final pairingTopic = proposal.pairingTopic;
  if (pairingTopic != null) {
    await _sendError(params.id, pairingTopic, params.reason);
    await client.proposal.delete(
      params.id.toString(),
      getSdkError(SdkErrorKey.USER_DISCONNECTED),
    );
  }
}