mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
fix(relay-members): route NIP-43 join/leave through launchSigner
The join/leave-request buttons launched a raw scope.launch(Dispatchers.IO) and called account.signer.sign() directly. When the signer threw — TimedOutException from a Samsung-A53 / Android-16 Amber prompt the user didn't respond to in 30s, or any other SignerException — the failure escaped the composable's scope and was reported as an uncaught crash instead of being toasted/logged like every other signing operation. Route both buttons through accountViewModel.launchSigner so the same SignerExceptions handling that every other signing entry point uses applies here too.
This commit is contained in:
+2
-2
@@ -154,13 +154,13 @@ fun RelayMembersScreen(
|
||||
joinRequestSent = joinRequestSent,
|
||||
leaveRequestSent = leaveRequestSent,
|
||||
onJoinRequest = {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
accountViewModel.launchSigner {
|
||||
sendJoinRequest(normalizedRelayUrl, accountViewModel)
|
||||
joinRequestSent = true
|
||||
}
|
||||
},
|
||||
onLeaveRequest = {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
accountViewModel.launchSigner {
|
||||
sendLeaveRequest(normalizedRelayUrl, accountViewModel)
|
||||
leaveRequestSent = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user