Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respec not escaping properly #1

Open
OR13 opened this issue Sep 4, 2021 · 0 comments
Open

Respec not escaping properly #1

OR13 opened this issue Sep 4, 2021 · 0 comments

Comments

@OR13
Copy link
Sponsor Member

OR13 commented Sep 4, 2021


const messagesToObject = async (
  messages: string[],
  { context, documentLoader }: any
) => {
  const proofMessages = messages.filter((m: string) => {
    return m.startsWith('<urn:merkle-dislosure-proof:ephemeral-blank-node-id>');
  });
  const documentMessages = messages.filter((m: string) => {
    return !m.startsWith(
      '<urn:merkle-dislosure-proof:ephemeral-blank-node-id>'
    );
  });
  const proof = await getObject(proofMessages, context, documentLoader);
  const document = await getObject(documentMessages, context, documentLoader);

  const combined = {
    ...document,
    proof,
  };
  delete combined.proof['@context'];
  delete combined.proof['@id'];
  delete combined.proof.id;

  return combined;
};

'<urn:merkle-dislosure-proof:ephemeral-blank-node-id>' is not getting rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant