mirror of
https://github.com/Reckless-Satoshi/robosats.git
synced 2024-09-11 19:57:11 +03:00
Fix LND version and correct onlion urls
This commit is contained in:
parent
04c9466c3e
commit
8fcad56e15
27
api/utils.py
27
api/utils.py
@ -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)
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user