From 3f03a845ecab3574fb74f0b1a203b2340819405d Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Sun, 25 Nov 2018 22:00:43 -0300 Subject: [PATCH] only return invalid signatures if its a direct resolution --- lbrynet/extras/wallet/resolve.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lbrynet/extras/wallet/resolve.py b/lbrynet/extras/wallet/resolve.py index b6c07a6f1..d0a5d3b3e 100644 --- a/lbrynet/extras/wallet/resolve.py +++ b/lbrynet/extras/wallet/resolve.py @@ -136,10 +136,13 @@ class Resolver: if claims_in_channel: result['claims_in_channel'] = claims_in_channel elif 'error' not in result: - result['error'] = "claim not found" - result['success'] = False - result['uri'] = str(parsed_uri) + return {'error': 'claim not found', 'success': False, 'uri': str(parsed_uri)} + # invalid signatures can only return in the form of name#claim_id + if result.get('claim', {}).get('has_signature', False): + if not result['claim']['signature_is_valid']: + if parsed_uri.path or parsed_uri.is_channel or not parsed_uri.claim_id or not parsed_uri.name: + return {'error': 'claim not found', 'success': False, 'uri': str(parsed_uri)} return result async def get_certificate_and_validate_result(self, claim_result):