From 35a822d3adca09a705835c159c21703bb84d4e17 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 10 Oct 2022 22:44:07 +0200 Subject: [PATCH] try except both functions --- cashu/mint/ledger.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cashu/mint/ledger.py b/cashu/mint/ledger.py index eda27b7..8f6a885 100644 --- a/cashu/mint/ledger.py +++ b/cashu/mint/ledger.py @@ -117,8 +117,6 @@ class Ledger: C = PublicKey(bytes.fromhex(proof.C), raw=True) # backwards compatibility with old hash_to_curve - # old clients do not send a version or - # new clients will send tokens which have a keyset id without a version logger.debug(f"Client version {context.get('client-version')}") if self.keysets.keysets.get(proof.id): logger.debug( @@ -135,6 +133,7 @@ class Ledger: return ret except: pass + return b_dhke.verify(secret_key, C, proof.secret) def _verify_script(self, idx: int, proof: Proof):