From 5e7d137bbc944f628f6c7ef21e3f783f187d7774 Mon Sep 17 00:00:00 2001 From: goncalo-frade-iohk Date: Fri, 28 Mar 2025 15:34:55 +0000 Subject: [PATCH] fix: a workaround prism did since the master key should not be handled Signed-off-by: goncalo-frade-iohk --- .../Pollux/Sources/PolluxImpl+CredentialRequest.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialRequest.swift b/EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialRequest.swift index 3c76973f..0f1fa9f9 100644 --- a/EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialRequest.swift +++ b/EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialRequest.swift @@ -118,7 +118,10 @@ extension PolluxImpl { return false }), case let CredentialOperationsOptions.exportableKeys(exportableKeys) = exportableKeyOption, - let exportableFirstKey = exportableKeys.filter({ $0.jwk.crv?.lowercased() == "secp256k1" }).first + let exportableFirstKey = exportableKeys.filter({ + $0.jwk.crv?.lowercased() == "secp256k1" + && !($0.jwk.kid?.contains("#master") ?? true) // TODO: This is a hardcoded fix, since prism DID doesnt not recognize master key + }).first else { throw PolluxError.requiresExportableKeyForOperation(operation: "Create Credential Request") }