mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00: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()
|
return median_rates.tolist()
|
||||||
|
|
||||||
lnd_v_cache = {}
|
|
||||||
@ring.dict(lnd_v_cache, expire=3600) #keeps in cache for 3600 seconds
|
|
||||||
def get_lnd_version():
|
def get_lnd_version():
|
||||||
|
|
||||||
# Reads lnd version from CLI
|
# If dockerized, return LND_VERSION envvar used for docker image.
|
||||||
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.
|
|
||||||
# Otherwise it would require LND's version.grpc libraries...
|
# Otherwise it would require LND's version.grpc libraries...
|
||||||
if lnd_version == '':
|
try:
|
||||||
try:
|
lnd_version = config('LND_VERSION')
|
||||||
lnd_version = config('LND_VERSION')
|
return lnd_version
|
||||||
except:
|
except:
|
||||||
pass
|
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 = {}
|
robosats_commit_cache = {}
|
||||||
@ring.dict(robosats_commit_cache, expire=3600)
|
@ring.dict(robosats_commit_cache, expire=3600)
|
||||||
|
@ -110,7 +110,7 @@ export default class BottomBar extends Component {
|
|||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemIcon><WebIcon/></ListItemIcon>
|
<ListItemIcon><WebIcon/></ListItemIcon>
|
||||||
<ListItemText secondary={this.state.alternative_name}>
|
<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>
|
</a>
|
||||||
</ListItemText>
|
</ListItemText>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user