Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
fix: cheqd network parameter (#39)
Browse files Browse the repository at this point in the history
* fix: cheqd network parameter
* chore: default to empty string when keyid param is missing
* chore: did-lib dependency version update
  • Loading branch information
mikeplotean authored Oct 23, 2023
1 parent bbb3313 commit f1ccd8e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dependencies {


// waltid-did
implementation("id.walt.did:waltid-did:1.0.0")//id.walt.crypto provided by id.walt.did:waltid-did
implementation("id.walt.did:waltid-did:1.0.1")//id.walt.crypto provided by id.walt.did:waltid-did

// OIDC
implementation("id.walt:waltid-openid4vc:1.2310051536.0")
Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/id/walt/service/SSIKit2WalletService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,7 @@ class SSIKit2WalletService(accountId: UUID) : WalletService(accountId) {
"jwk" -> DidJwkCreateOptions()
"web" -> DidWebCreateOptions(domain = args["domain"]?.content ?: "", path = args["path"]?.content ?: "")
"cheqd" -> DidCheqdCreateOptions(
network = args["network"]?.content ?: "test",
document = Json.decodeFromString<JsonObject>(args["document"]?.content ?: "")
network = args["network"]?.content ?: "testnet",
)
else -> throw IllegalArgumentException("Did method not supported: $method")
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/id/walt/web/DidCreation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ object DidCreation {
private fun extractDidCreateParameters(method: String, parameters: Parameters): Map<String, JsonPrimitive> = mapOf(
// common
"alias" to JsonPrimitive(parameters["alias"]?.takeIf { it.isNotEmpty() } ?: "n/a"),
"keyId" to JsonPrimitive(parameters["keyId"]),
"keyId" to JsonPrimitive(parameters["keyId"] ?: ""),
).plus(
// specific
when (method) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/settings/dids/create/cheqd.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<DidCreationView :didParams="{network: domain}" method="cheqd">
<DidCreationView :didParams="{network: network}" method="cheqd">

<div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:py-4">
<label class="block text-sm font-medium leading-6 text-gray-900 sm:pt-1.5" for="format">Network</label>
Expand Down

0 comments on commit f1ccd8e

Please sign in to comment.