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 ->