disconnect method

  1. @override
Future<void> disconnect({
  1. required String topic,
})
override

Implementation

@override
Future<void> disconnect({required String topic}) async {
  _isInitialized();
  await _isValidPairingTopic(topic);
  if (pairings.keys.contains(topic)) {
    await _sendRequest<ErrorResponse>(
      topic,
      PairingMethod.WC_PAIRING_DELETE,
      getSdkError(SdkErrorKey.USER_DISCONNECTED),
      (e) => e.toJson(),
    );
    await _deletePairing(topic: topic);
  }
}