decentralized-identity / decentralized-identity/veramo

[BUG] `didManagerAddKey` fails to add externally controlled key, but returns `{"success": true}`

Open
#892 1 comment 0 reactions 0 assignees View on GitHub
bug pinned
Dominant language
TypeScript
Stars
543
Forks
137
Avg merge
12m
Merged PRs (30d)
2

Description

**Bug severity**
3

**Describe the bug**
Trying to add a key to a DID using `didManagerAddKey` fails if the key is not managed by the agent

**To Reproduce**
Steps to reproduce the behaviour:
1. Make request to `didManagerAddKey` with either invalid key data OR valid key data for key not managed by agent (i.e. key does not exist in agent key table). I reproduced trying to add to a managed did:web but bug likely applies to other DID types.
2. Notice that request returns `{"success": true}` but DB is not modified in any way

**Observed behaviour**
Request returns success but key is not successfully added.

**Expected behaviour**
When valid key is sent, key should be added to DID. When invalid key is sent, request should return error.

**Additional context**
Created branch `nickreynolds/did-manager-tests` with test that demonstrates the problem.

**Versions (please complete the following information):**
- Veramo: @veramo/did-manager@3.1.0 - next

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.