forked from LBRYCommunity/lbry-sdk
remove supports from resolve
This commit is contained in:
parent
8777dcee7c
commit
8afe178d62
2 changed files with 6 additions and 8 deletions
|
@ -190,7 +190,7 @@ class LBRYElectrumX(ElectrumX):
|
|||
claims = await self.daemon.getclaimsforname(name)
|
||||
if claims:
|
||||
claims['claims'] = [self.format_claim_from_daemon(claim, name) for claim in claims['claims']]
|
||||
claims['supports_without_claims'] = claims['supports without claims']
|
||||
claims['supports_without_claims'] = [] # fixme temporary
|
||||
del claims['supports without claims']
|
||||
claims['last_takeover_height'] = claims['nLastTakeoverHeight']
|
||||
del claims['nLastTakeoverHeight']
|
||||
|
@ -224,7 +224,9 @@ class LBRYElectrumX(ElectrumX):
|
|||
# raise RPCError("Lbrycrd has {} but not lbryumx, please submit a bug report.".format(claim_id))
|
||||
return {}
|
||||
address = info.address.decode()
|
||||
supports = self.format_supports_from_daemon(claim.get('supports', []))
|
||||
# fixme: temporary
|
||||
#supports = self.format_supports_from_daemon(claim.get('supports', []))
|
||||
supports = []
|
||||
|
||||
amount = get_from_possible_keys(claim, 'amount', 'nAmount')
|
||||
height = get_from_possible_keys(claim, 'height', 'nHeight')
|
||||
|
|
|
@ -138,8 +138,6 @@ class EpicAdventuresOfChris45(CommandTestCase):
|
|||
# It obviously did! Because, blockchain baby \O/
|
||||
self.assertEqual(resolve_result[uri]['claim']['amount'], '1.0')
|
||||
self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.2')
|
||||
self.assertEqual(resolve_result[uri]['claim']['supports'][0]['amount'], '0.2')
|
||||
self.assertEqual(resolve_result[uri]['claim']['supports'][0]['txid'], tx['txid'])
|
||||
await self.generate(5)
|
||||
|
||||
# Now he also wanted to support the original creator of the Award Winning Novel
|
||||
|
@ -152,8 +150,7 @@ class EpicAdventuresOfChris45(CommandTestCase):
|
|||
# And again checks if it went to the just right place
|
||||
resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri))
|
||||
# Which it obviously did. Because....?????
|
||||
self.assertEqual(resolve_result[uri]['claim']['supports'][1]['amount'], '0.3')
|
||||
self.assertEqual(resolve_result[uri]['claim']['supports'][1]['txid'], tx['txid'])
|
||||
self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.5')
|
||||
await self.generate(5)
|
||||
|
||||
# Seeing the ravishing success of his novel Chris adds support to his claim too
|
||||
|
@ -163,8 +160,7 @@ class EpicAdventuresOfChris45(CommandTestCase):
|
|||
# And check if his support showed up
|
||||
resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri))
|
||||
# It did!
|
||||
self.assertEqual(resolve_result[uri]['claim']['supports'][2]['amount'], '0.4')
|
||||
self.assertEqual(resolve_result[uri]['claim']['supports'][2]['txid'], tx['txid'])
|
||||
self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.9')
|
||||
await self.generate(5)
|
||||
|
||||
# Now Ramsey who is a singer by profession, is preparing for his new "gig". He has everything in place for that
|
||||
|
|
Loading…
Reference in a new issue