respondSessionRequest method
Future<void>
respondSessionRequest({
- required String topic,
- required JsonRpcResponse response,
override
Implementation
@override
Future<void> respondSessionRequest({
required String topic,
required JsonRpcResponse response,
}) async {
_checkInitialized();
await _isValidResponse(topic, response);
// final SessionRequest req = pendingRequests.get(response.id.toString())!;
// print('respondSessionRequest: ${req.toJson()}');
if (response.result != null) {
await core.pairing.sendResult(
response.id,
topic,
MethodConstants.WC_SESSION_REQUEST,
response.result,
);
} else {
await core.pairing.sendError(
response.id,
topic,
MethodConstants.WC_SESSION_REQUEST,
response.error!,
);
}
await _deletePendingRequest(response.id);
}