Skip to content

Commit

Permalink
fix: anoncred nonce + enhancements
Browse files Browse the repository at this point in the history
Signed-off-by: Allain Magyar <allain.magyar@iohk.io>
  • Loading branch information
amagyar-iohk committed Sep 9, 2024
1 parent bf45b3d commit 8d722d5
Show file tree
Hide file tree
Showing 5 changed files with 3,124 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.hyperledger.identus.walletsdk.edgeagent.mediation

import io.ktor.client.HttpClient
import io.ktor.client.plugins.HttpTimeout
import io.ktor.client.plugins.websocket.WebSockets
import io.ktor.client.plugins.websocket.webSocket
import io.ktor.websocket.Frame
import io.ktor.websocket.readText
import io.ktor.client.*
import io.ktor.client.plugins.*
import io.ktor.client.plugins.websocket.*
import io.ktor.websocket.*
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flow
Expand Down Expand Up @@ -214,17 +212,11 @@ class BasicMediatorHandler(
send(Frame.Text(packedMessage))
}
while (isActive) {
try {
for (frame in incoming) {
if (frame is Frame.Text) {
val messages =
handleReceivedMessagesFromSockets(frame.readText())
onMessageCallback.onMessage(messages)
}
for (frame in incoming) {
if (frame is Frame.Text) {
val messages = handleReceivedMessagesFromSockets(frame.readText())
onMessageCallback.onMessage(messages)
}
} catch (e: Exception) {
e.printStackTrace()
continue
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,8 @@ data class IssueCredential(
* @return An array of credential strings.
*/
fun getCredentialStrings(): Array<String> {
return attachments.mapNotNull {
when (it.data) {
is AttachmentBase64 -> {
it.data.base64.base64UrlEncoded
}

else -> null
}
return attachments.map {
it.data.getDataAsJsonString()
}.toTypedArray()
}

Expand Down
Loading

0 comments on commit 8d722d5

Please sign in to comment.