Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#17 engine responses #72

Merged
merged 11 commits into from
Feb 11, 2022
Merged

#17 engine responses #72

merged 11 commits into from
Feb 11, 2022

Conversation

sekimondre
Copy link

closes #17

@sekimondre sekimondre marked this pull request as ready for review February 10, 2022 18:20
guard sequencesStore.hasSequence(forTopic: topic) else {
logger.debug("Could not find session for topic \(topic)")
relayer.respondError(for: payload, reason: .noContextWithTopic(context: .session, topic: topic))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see it ever happens

Comment on lines -263 to +275
handleSessionApprove(approveParams, topic: topic, requestId: requestId)
wcSessionApprove(subscriptionPayload, approveParams: approveParams)
case .sessionReject(let rejectParams):
handleSessionReject(rejectParams, topic: topic)
wcSessionReject(subscriptionPayload, rejectParams: rejectParams)
case .sessionUpdate(let updateParams):
handleSessionUpdate(payload: subscriptionPayload, updateParams: updateParams)
wcSessionUpdate(payload: subscriptionPayload, updateParams: updateParams)
case .sessionUpgrade(let upgradeParams):
handleSessionUpgrade(payload: subscriptionPayload, upgradeParams: upgradeParams)
wcSessionUpgrade(payload: subscriptionPayload, upgradeParams: upgradeParams)
case .sessionDelete(let deleteParams):
handleSessionDelete(deleteParams, topic: topic)
wcSessionDelete(subscriptionPayload, deleteParams: deleteParams)
case .sessionPayload(let sessionPayloadParams):
handleSessionPayload(payloadParams: sessionPayloadParams, topic: topic, requestId: requestId)
wcSessionPayload(subscriptionPayload, payloadParams: sessionPayloadParams)
case .sessionPing(_):
handleSessionPing(topic: topic, requestId: requestId)
wcSessionPing(subscriptionPayload)
case .sessionNotification(let notificationParams):
handleSessionNotification(topic: topic, notificationParams: notificationParams, requestId: requestId)
wcSessionNotification(subscriptionPayload, notificationParams: notificationParams)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally prefer old naming but not a big deal

@llbartekll llbartekll merged commit 13c11ac into develop Feb 11, 2022
@llbartekll llbartekll deleted the #17-engine-responses branch February 11, 2022 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Refactor engine methods that are still using completion handlers for responses
2 participants