fix: mapping of user was done each time component was initialised (#3573)

This commit is contained in:
dni ⚡
2025-11-26 13:21:36 +01:00
committed by GitHub
parent baa9a35773
commit 21505471d5
6 changed files with 19 additions and 40 deletions
+1 -11
View File
@@ -1,18 +1,8 @@
{% macro window_vars(user, wallet, extensions, extension_data) -%}
{% macro window_vars(user) -%}
<script id="window-vars-script">
window.extensions = JSON.parse('{{ EXTENSIONS | tojson | safe }}');
{% if extension_data %}
window.extension_data = {{ extension_data | tojson | safe }};
{% endif %}
{% if currencies %}
window.currencies = {{ currencies | tojson | safe }};
{% endif %}
{% if user %}
window.user = JSON.parse({{ user | tojson | safe }});
{% endif %}
{% if wallet %}
window.wallet = JSON.parse({{ wallet | tojson | safe }});
{% endif %}
</script>
<script>
//Needed for Vue to create the app on first load (although called on every page, its only loaded once)