lnbits-legend/lnbits/templates/macros.jinja

15 lines
406 B
Text
Raw Normal View History

{% macro window_vars(user, wallet) -%}
<script>
window.extensions = {{ EXTENSIONS | tojson | safe }};
{% if currencies %}
window.currencies = {{ currencies | tojson | safe }};
{% endif %}
{% if user %}
window.user = {{ user | tojson | safe }};
{% endif %}
{% if wallet %}
window.wallet = {{ wallet | tojson | safe }};
{% endif %}
</script>
{%- endmacro %}