Fix LND version and correct onlion urls

This commit is contained in:
Reckless_Satoshi 2022-02-12 10:22:05 -08:00
parent 04c9466c3e
commit 8fcad56e15
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 15 additions and 16 deletions

View File

@ -50,24 +50,23 @@ def get_exchange_rates(currencies):
return median_rates.tolist()
lnd_v_cache = {}
@ring.dict(lnd_v_cache, expire=3600) #keeps in cache for 3600 seconds
def get_lnd_version():
# Reads lnd version from CLI
stream = os.popen('lnd --version')
lnd_version = stream.read()[:-1]
# If dockerized, the command above will fail.
# Instead, return LND_VERSION envvar used for docker image.
# If dockerized, return LND_VERSION envvar used for docker image.
# Otherwise it would require LND's version.grpc libraries...
if lnd_version == '':
try:
lnd_version = config('LND_VERSION')
except:
pass
try:
lnd_version = config('LND_VERSION')
return lnd_version
except:
pass
return lnd_version
# If not dockerized, and LND is local, read from CLI
try:
stream = os.popen('lnd --version')
lnd_version = stream.read()[:-1]
return lnd_version
except:
return ''
robosats_commit_cache = {}
@ring.dict(robosats_commit_cache, expire=3600)

View File

@ -110,7 +110,7 @@ export default class BottomBar extends Component {
<ListItem>
<ListItemIcon><WebIcon/></ListItemIcon>
<ListItemText secondary={this.state.alternative_name}>
<a target="_blank" href={"https://"+this.alternative_site}>{this.state.alternative_site.slice(0, 12)+"...onion"}
<a target="_blank" href={"http://"+this.state.alternative_site}>{this.state.alternative_site.slice(0, 12)+"...onion"}
</a>
</ListItemText>
</ListItem>

File diff suppressed because one or more lines are too long