{% macro window_vars(user, wallet) -%}
  <script>
    window.extensions = {{ EXTENSIONS | tojson | safe }};
    {% 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>
{%- endmacro %}
