This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Open
Conversation
alexander-lsvk
commented
Sep 28, 2023
| private func manageSubscription(_ topic: String, _ encodedEnvelope: String, _ publishedAt: Date) { | ||
| if let (deserializedJsonRpcRequest, derivedTopic, decryptedPayload): (RPCRequest, String?, Data) = serializer.tryDeserialize(topic: topic, encodedEnvelope: encodedEnvelope) { | ||
| handleRequest(topic: topic, request: deserializedJsonRpcRequest, decryptedPayload: decryptedPayload, publishedAt: publishedAt, derivedTopic: derivedTopic) | ||
| if let rpcRequestTopic = deserializedJsonRpcRequest.topic { |
Contributor
Author
There was a problem hiding this comment.
Check if the subscription topic matches the request's topic.
If there is no request topic - the request will be handled to support backward compatibility.
Contributor
|
@alexander-lsvk can you add the section, how it's been tested? |
llbartekll
reviewed
Sep 28, 2023
Contributor
llbartekll
left a comment
There was a problem hiding this comment.
looks good but need to be manually tested with all the platforms.
also, how about writing a unit test to ensure backward compatibility?
| if rpcRequestTopic == topic { | ||
| handleRequest(topic: topic, request: deserializedJsonRpcRequest, decryptedPayload: decryptedPayload, publishedAt: publishedAt, derivedTopic: derivedTopic) | ||
| } else { | ||
| logger.debug("Networking Interactor - Mismatched topic decoded from message") |
Contributor
There was a problem hiding this comment.
should we log it as an error or warning?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Gist: https://gist.github.com/jakubuid/4d111f02503a48508d22ff7cb2dcca32
Thread: https://walletconnect.slack.com/archives/C04E3TVLHU7/p1694246632728979
How Has This Been Tested?
Due Dilligence