Skip to content

Commit 0cbfaf8

Browse files
authored
fix: a workaround prism did since the master key should not be handled (#201)
2 parents d60dd7d + 5e7d137 commit 0cbfaf8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialRequest.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ extension PolluxImpl {
118118
return false
119119
}),
120120
case let CredentialOperationsOptions.exportableKeys(exportableKeys) = exportableKeyOption,
121-
let exportableFirstKey = exportableKeys.filter({ $0.jwk.crv?.lowercased() == "secp256k1" }).first
121+
let exportableFirstKey = exportableKeys.filter({
122+
$0.jwk.crv?.lowercased() == "secp256k1"
123+
&& !($0.jwk.kid?.contains("#master") ?? true) // TODO: This is a hardcoded fix, since prism DID doesnt not recognize master key
124+
}).first
122125
else {
123126
throw PolluxError.requiresExportableKeyForOperation(operation: "Create Credential Request")
124127
}

0 commit comments

Comments
 (0)