ping method
Implementation
@override
Future<void> ping({required String topic}) async {
_isInitialized();
await _isValidPairingTopic(topic);
if (pairings.keys.contains(topic)) {
final id = await _sendRequest(
topic, PairingMethod.WC_PAIRING_PING, {}, (_) => {});
final completer = Completer<void>();
final timer = completer.expirer();
events.once(engineEvent(EngineEvent.PAIRING_PING, id), (data) {
timer.cancel();
if (data is ErrorResponse) {
completer.completeError(data);
} else {
completer.complete();
}
});
await completer.future;
}
}