diff --git a/packages/element-lib/src/sidetree-v2/protocol/resolve.js b/packages/element-lib/src/sidetree-v2/protocol/resolve.js index e68c25e5..504a9ceb 100644 --- a/packages/element-lib/src/sidetree-v2/protocol/resolve.js +++ b/packages/element-lib/src/sidetree-v2/protocol/resolve.js @@ -31,7 +31,7 @@ const applyPatch = (didDocument, patch) => { return patch.publicKeys.reduce((currentState, publicKey) => { const existingKey = publicKeyMap.get(publicKey); // Deleting recovery key is NOT allowed. - if (existingKey !== undefined && existingKey.type !== '#recovery') { + if (existingKey !== undefined && existingKey.id !== '#recovery') { publicKeyMap.delete(publicKey); return { ...currentState,