porting back in mainnet conversion for /v1/names/<foo> endpoint

This commit is contained in:
Aaron Blankstein
2017-07-11 14:56:26 -04:00
parent b5c62cc332
commit b8ebdb0c05
3 changed files with 7 additions and 2 deletions

View File

@@ -768,12 +768,16 @@ class BlockstackAPIEndpointHandler(SimpleHTTPRequestHandler):
status = 'revoked' if name_rec['revoked'] else 'registered'
address = name_rec['address']
if address:
address = virtualchain.address_reencode(str(address), network='mainnet')
log.debug("{} is {}".format(name, status))
ret = {
'status': status,
'zonefile': zonefile_txt,
'zonefile_hash': name_rec['value_hash'],
'address': name_rec['address'],
'address': address,
'last_txid': name_rec['txid'],
'blockchain': 'bitcoin',
'expire_block': name_rec['expire_block'],