Hide sphinx on testnet

This commit is contained in:
Taylor Helsper 2021-03-15 23:24:26 -05:00
parent 402ad89ce5
commit f09a8f126c
2 changed files with 9 additions and 5 deletions

View File

@ -544,6 +544,8 @@ def get_ckbunker_status_and_color():
def get_sphinxrelay_status_and_color():
color = "gray"
status = "Chat"
if is_testnet_enabled():
return "Requires Mainnet", "gray"
if is_lnd_ready():
if is_sphinxrelay_enabled():
status_code = get_service_status_code("sphinxrelay")

View File

@ -241,11 +241,13 @@
{% if product_key_skipped %}
Premium Feature
{% else %}
{% if sphinxrelay_enabled %}
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/sphinxrelay">Info</a>
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-sphinxrelay">Disable</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-sphinxrelay">Enable</a>
{% if lnd_ready and not is_testnet_enabled %}
{% if sphinxrelay_enabled %}
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/sphinxrelay">Info</a>
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-sphinxrelay">Disable</a>
{% else %}
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="toggle-sphinxrelay">Enable</a>
{% endif %}
{% endif %}
{% endif %}
</div>