Skip to content

Commit

Permalink
fix undefined method (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
Orie Steele committed Mar 30, 2019
1 parent de8e36b commit efa7a78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/transmute-did/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/transmute-did/package.json
@@ -1,6 +1,6 @@
{
"name": "@transmute/transmute-did",
"version": "1.1.7",
"version": "1.1.8",
"description": "",
"main": "./src/index.js",
"scripts": {
Expand Down
9 changes: 4 additions & 5 deletions packages/transmute-did/src/lib/signatureMethods.js
Expand Up @@ -35,6 +35,7 @@ const publicKeyToDID = async (type, publicKey) => {
}
};

// eslint-disable-next-line
const getPublicKeyFromDIDDocByKID = (doc, kid) => {
const key = _.find(doc.publicKey, k => k.id === kid);

Expand Down Expand Up @@ -243,6 +244,7 @@ const verifySignedLinkedData = async ({
});
// eslint-disable-next-line
try {
// eslint-disable-next-line
const verification = await verifyDIDSignatureWithResolver({
object,
signature,
Expand Down Expand Up @@ -349,11 +351,7 @@ const verifyDIDSignature = (object, signature, meta, doc) => {
publicKey,
});
case 'ethr':
return ethereumExtensions.verify(
stringify(object),
signature,
publicKey,
);
return ethereumExtensions.verify(stringify(object), signature, publicKey);

default:
throw new Error('Unknown key type');
Expand Down Expand Up @@ -390,4 +388,5 @@ module.exports = {
publicKeyKIDPrefix,
verifyDIDSignatureWithResolver,
isLinkedDataSignedByDocument,
getPublicKeyFromDIDDocByKID,
};

0 comments on commit efa7a78

Please sign in to comment.