From a53dcf8d51bcce07df855fb33b224c5c26419336 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Thu, 28 Nov 2024 16:11:25 +0100
Subject: [PATCH] wot status: Remove loop to get the right identity (#470)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since 41fd9269 (#470), wot.requirements result is about the pubkey
Unless a pubkey has been passed in uid field. I don’t think
the result should contain identities sharing a pubkey as pubkey and uid
---
 silkaj/wot/status.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/silkaj/wot/status.py b/silkaj/wot/status.py
index 1b74b1a7..fe03fceb 100644
--- a/silkaj/wot/status.py
+++ b/silkaj/wot/status.py
@@ -71,12 +71,7 @@ def status(uid_pubkey: str) -> None:
     certifications = OrderedDict()  # type: OrderedDict
     params = get_blockchain_parameters()
 
-    req = None
-    requirements = client(wot.requirements, search=pubkey, pubkey=True)
-    for req in requirements["identities"]:
-        if req["pubkey"] == pubkey:
-            break
-
+    req = (client(wot.requirements, search=pubkey, pubkey=True))["identities"][0]
     certifications["received_expire"] = []
     certifications["received"] = []
     certifications["sent"] = []
-- 
GitLab