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

#347 extend pairing on approve proposal #373

Merged
merged 3 commits into from
Jul 28, 2022

Conversation

llbartekll
Copy link
Contributor

extend pairing on every approve proposal on wallet

@llbartekll llbartekll self-assigned this Jul 27, 2022
@llbartekll llbartekll marked this pull request as draft July 27, 2022 08:07
@llbartekll llbartekll changed the base branch from main to develop July 27, 2022 08:07
@llbartekll llbartekll marked this pull request as ready for review July 27, 2022 08:07
try await networkingInteractor.respond(topic: payload.topic, response: .response(response), tag: payload.wcRequest.responseTag)

try pairing.updateExpiry()
Copy link
Contributor

Choose a reason for hiding this comment

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

we also extending pairing in handleProposeResponse. So in approve method we extending for wallet, and in handleProposeResponse we extending for dapp, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct

@@ -82,7 +81,15 @@ final class ApproveEngine {
let proposeResponse = SessionType.ProposeResponse(relay: relay, responderPublicKey: selfPublicKey.hexRepresentation)
let response = JSONRPCResponse<AnyCodable>(id: payload.wcRequest.id, result: AnyCodable(proposeResponse))

guard var pairing = pairingStore.getPairing(forTopic: payload.topic) else {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we care about pairing is active / inactive ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think on wallet pairing is always active

Copy link
Contributor Author

@llbartekll llbartekll Jul 28, 2022

Choose a reason for hiding this comment

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

exactly

@llbartekll llbartekll merged commit bd965c0 into develop Jul 28, 2022
@llbartekll llbartekll deleted the #347-Extend-pairing-on-approve-Proposal branch July 28, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants