decentralized-identity/universal-resolver-frontend

UI breaks if the value of "serviceEndpoint" is an object

Opened this issue · 0 comments

The frontend UI incorrectly assumes that the value of serviceEndpoint is always a string. It should also be able to handle cases where the value is an object (see Service Endpoints in DID Core).

E.g. if a DID document contains this:

		"service": [{
			"id": "PersonalInfo",
			"type": "AgentService",
			"serviceEndpoint": {
				"type": "UserServiceEndpoint"
			}
		}],

then React gives the following error:

Objects are not valid as a React child (found: object with keys {type}). If you meant to render a collection of children, use an array instead.