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

fix: approve session proposal, receive session disconnect #1331

Merged
merged 6 commits into from
Feb 28, 2024

Conversation

jakubuid
Copy link
Contributor

No description provided.

@jakubuid jakubuid requested review from Talhaali00 and a team as code owners February 27, 2024 09:23
Copy link
Contributor

@Talhaali00 Talhaali00 left a comment

Choose a reason for hiding this comment

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

also curious about why you switched the toast code in the sample

@@ -358,6 +368,6 @@ internal class SignEngine(
}

companion object {
private const val WATCHER_INTERVAL = 3000L
private const val WATCHER_INTERVAL = 5000L
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you think about bumping this value to something like 10 or even 30 sec? I think to save on resources, we could check less frequently. We also have other checks to validate expiry so I think we would be ok having something longer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I agree. I think that checking every 30s is fine

try {
val pairingTopics = pairingRepository.getListOfPairings().filter { pairing -> pairing.isNotExpired() }.map { pairing -> pairing.topic.value }
val pairingTopics = runBlocking { pairingRepository.getListOfPairings().filter { pairing -> pairing.isNotExpired() }.map { pairing -> pairing.topic.value } }
Copy link
Contributor

Choose a reason for hiding this comment

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

why does this need to be blocking? I think we should think about going the other way and launch a coroutine in the init block and make this function a suspend function to run async. We're already launching coroutines inside of this function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point. Made this function a suspend function.

@jakubuid
Copy link
Contributor Author

also curious about why you switched the toast code in the sample

It was causing session request and proposal dialogs to disappear in some corner cases

@jakubuid jakubuid merged commit 6bcfb68 into develop Feb 28, 2024
13 of 14 checks passed
@jakubuid jakubuid deleted the fix/bunch_of_reported_issues branch February 28, 2024 14:14
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