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

[Networking] #502 Add tll and prompt to requests #514

Merged
merged 10 commits into from
Sep 27, 2022

Conversation

llbartekll
Copy link
Contributor

Description

  • Add TTL and prompt properties to publish request
  • Refactor protocol methods implementations

Resolves #502

How Has This Been Tested?

with integrations tests

Due Dilligence

  • Breaking change
  • Requires a documentation update

@llbartekll llbartekll self-assigned this Sep 26, 2022
@arein arein added the accepted label Sep 26, 2022
}
}
struct AuthRequestProtocolMethod: ProtocolMethod {
var method: String = "wc_authRequest"
Copy link
Contributor

Choose a reason for hiding this comment

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

why var?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because xcode has generated it that as vars. Anyway good point, I am changing for lets

@@ -59,28 +59,29 @@ final class SessionEngine {
let chainRequest = SessionType.RequestParams.Request(method: request.method, params: request.params)
let sessionRequestParams = SessionType.RequestParams(request: chainRequest, chainId: request.chainId)

let rpcRequest = RPCRequest(method: SignProtocolMethod.sessionRequest.method, params: sessionRequestParams)
try await networkingInteractor.request(rpcRequest, topic: request.topic, tag: SignProtocolMethod.sessionRequest.requestTag)
let rpcRequest = RPCRequest(method: SessionRequestProtocolMethod().method, params: sessionRequestParams)
Copy link
Contributor

Choose a reason for hiding this comment

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

SessionRequestProtocolMethod() to variable? To avoid typo later

Copy link
Contributor

Choose a reason for hiding this comment

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

but may be it better to isolate RPCRequest creation inside Networking package. But it another task of course

Copy link
Contributor

@flypaper0 flypaper0 left a comment

Choose a reason for hiding this comment

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

lgtm, great job!

@llbartekll llbartekll merged commit 245d100 into develop Sep 27, 2022
@llbartekll llbartekll deleted the #502-add-tll-prompt-to-requests branch September 27, 2022 09:04
@flypaper0 flypaper0 mentioned this pull request Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants