Skip to content

Commit 422c07a

Browse files
Merge pull request #234 from walt-id/fix-issuer-object-removal-on-template-registration
fix: when registering templates issuer object is reset
2 parents 238572c + 3c0bd2e commit 422c07a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/id/walt/credentials/w3c/templates/VcTemplateManager.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package id.walt.credentials.w3c.templates
22

33
import id.walt.credentials.w3c.VerifiableCredential
4+
import id.walt.credentials.w3c.W3CIssuer
45
import id.walt.credentials.w3c.toVerifiableCredential
56
import id.walt.services.context.ContextManager
67
import id.walt.services.hkvstore.HKVKey
@@ -17,7 +18,7 @@ object VcTemplateManager {
1718

1819
fun register(name: String, template: VerifiableCredential): VcTemplate {
1920
template.proof = null
20-
template.issuer = null
21+
template.issuer = template.issuer?.let { W3CIssuer("", it._isObject, it.properties) }
2122
template.credentialSubject?.id = null
2223
template.id = null
2324
ContextManager.hkvStore.put(HKVKey(SAVED_VC_TEMPLATES_KEY, name), template.toJson())

0 commit comments

Comments
 (0)