From d069569b3273a54c3400bae308792a5b85029db5 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Tue, 28 Mar 2023 13:05:39 +0200 Subject: [PATCH] fix: Fix selfCertifications order --- src/keys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keys.js b/src/keys.js index bb62e4a..12ee7d0 100644 --- a/src/keys.js +++ b/src/keys.js @@ -283,7 +283,7 @@ const process = async (publicKey) => { } if ('selfCertifications' in user && user.selfCertifications.length > 0) { - const selfCertification = user.selfCertifications[0] + const selfCertification = user.selfCertifications.sort((e1, e2) => e2.created - e1.created)[0] const notations = selfCertification.rawNotations usersOutput[i].claims = notations