From 441b090edfd031f18b8ad322cab4a422de0f1ad2 Mon Sep 17 00:00:00 2001 From: Zoe Maas Date: Mon, 28 Oct 2024 09:35:55 +0100 Subject: [PATCH] fix: Fixed issues with the implementation of the Default Trust Chain implementation. --- .../com/sphereon/oid/fed/client/trustchain/TrustChain.js.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/trustchain/TrustChain.js.kt b/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/trustchain/TrustChain.js.kt index 10893312..0b9eeb44 100644 --- a/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/trustchain/TrustChain.js.kt +++ b/modules/openid-federation-client/src/jsMain/kotlin/com/sphereon/oid/fed/client/trustchain/TrustChain.js.kt @@ -133,9 +133,10 @@ class DefaultTrustChainJSImpl( mapEntityStatement(entityConfigurationJwt, EntityConfigurationStatement::class) ?: return@async null if (chain.isEmpty()) { - chain[chain.size] = entityConfigurationJwt + chain.add(entityConfigurationJwt) } + println("Getting authority hints") val authorityHints = entityStatement.authorityHints ?: return@async null val reorderedAuthorityHints = authorityHints.sortedBy { hint ->