diff --git a/lbrynet/wallet/resolve.py b/lbrynet/wallet/resolve.py index f3c6795fa..dd71fef2b 100644 --- a/lbrynet/wallet/resolve.py +++ b/lbrynet/wallet/resolve.py @@ -169,8 +169,7 @@ class Resolver: ] claim_result['height'] = claim_result.get('height', -1) or -1 - claim_result['permanent_url'] = _get_permanent_url( - claim_result, channel_id) + claim_result['permanent_url'] = f"lbry://{claim_result['name']}#{claim_result['claim_id']}" return claim_result @@ -261,13 +260,6 @@ class Resolver: return page_generator, upper_bound -def _get_permanent_url(claim_result, certificate_id): - if certificate_id: - return f"{claim_result['channel_name']}#{certificate_id}/{claim_result['name']}" - else: - return f"{claim_result['name']}#{claim_result['claim_id']}" - - def _verify_proof(name, claim_trie_root, result, height, depth, ledger): """ Verify proof for name claim diff --git a/tests/integration/test_resolve_command.py b/tests/integration/test_resolve_command.py index 52c2a097e..ca81e4761 100644 --- a/tests/integration/test_resolve_command.py +++ b/tests/integration/test_resolve_command.py @@ -48,6 +48,10 @@ class ResolveCommand(CommandTestCase): self.assertEqual(claim['certificate']['name'], '@abc') self.assertEqual(claim['claims_in_channel'], 0) + # resolving from the given permanent url + new_response = await self.resolve(claim['claim']['permanent_url']) + self.assertEqual(new_response[claim['claim']['permanent_url']], claim) + # resolving multiple at once response = await self.resolve(['lbry://foo', 'lbry://foo2']) self.assertSetEqual({'lbry://foo', 'lbry://foo2'}, set(response))