diff --git a/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/ConnectionManager.kt b/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/ConnectionManager.kt index 2eca846eb..2f59627d0 100644 --- a/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/ConnectionManager.kt +++ b/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/ConnectionManager.kt @@ -85,22 +85,6 @@ class ConnectionManager( serviceEndpointUrl ) { arrayMessages -> processMessages(arrayMessages) -// // Process the received messages -// val messagesIds = mutableListOf() -// val messages = mutableListOf() -// arrayMessages.map { pair -> -// messagesIds.add(pair.first) -// messages.add(pair.second) -// } -// // If there are any messages, mark them as read and store them -// scope.launch { -// if (messagesIds.isNotEmpty()) { -// mediationHandler.registerMessagesAsRead( -// messagesIds.toTypedArray() -// ) -// pluto.storeMessages(messages) -// } -// } } } // Fallback mechanism if no WebSocket service endpoint is available @@ -109,18 +93,6 @@ class ConnectionManager( // Continuously await and process new messages awaitMessages().collect { array -> processMessages(array) -// val messagesIds = mutableListOf() -// val messages = mutableListOf() -// array.map { pair -> -// messagesIds.add(pair.first) -// messages.add(pair.second) -// } -// if (messagesIds.isNotEmpty()) { -// mediationHandler.registerMessagesAsRead( -// messagesIds.toTypedArray() -// ) -// pluto.storeMessages(messages) -// } } // Wait for the specified request interval before fetching new messages delay(Duration.ofSeconds(requestInterval.toLong()).toMillis()) diff --git a/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/PrismAgent.kt b/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/PrismAgent.kt index 553f1f057..ad5d23105 100644 --- a/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/PrismAgent.kt +++ b/atala-prism-sdk/src/commonMain/kotlin/io/iohk/atala/prism/walletsdk/prismagent/PrismAgent.kt @@ -988,6 +988,10 @@ class PrismAgent { ) } + /** + * This method provides a channel to listen for credentials that are revoked. As long as there is an + * observer collecting from this flow the updates will keep happening. + */ fun observeRevokedCredentials(): Flow> { return pluto.observeRevokedCredentials() .map { list ->