From 168284ce25a23d9a64f61bb08c38e6e6a01f6a84 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:50:29 +0000 Subject: [PATCH] wallet: cleanup, deduplicate, djlints --- basicswap/templates/wallet.html | 220 ++++++++++++++------------------ 1 file changed, 97 insertions(+), 123 deletions(-) diff --git a/basicswap/templates/wallet.html b/basicswap/templates/wallet.html index 9379de6..bb36768 100644 --- a/basicswap/templates/wallet.html +++ b/basicswap/templates/wallet.html @@ -101,17 +101,17 @@ {% endif %} -
-
-
+
+ +
-
- +
+
- + - + {% endif %} {# / locked_utxos #} @@ -176,7 +176,7 @@ - + {% endif %} {# / encrypted #} + {% if w.expected_seed != true %} + {% endif %}
@@ -151,7 +151,7 @@ {# / PART #} {% if w.cid == '3' %} {# LTC #}
{{ w.name }} MWEB MWEB Balance: {{ w.name }} MWEB MWEB Balance: {{ w.mweb_balance }} {{ w.ticker }} () {% if w.mweb_pending %} Pending: +{{ w.mweb_pending }} {{ w.ticker }} @@ -163,7 +163,7 @@ {% if w.locked_utxos %}
Locked Outputs:{{ w.locked_utxos }}{{ w.locked_utxos }}
{{ w.version }}
Blocks:Blockheight: {{ w.blocks }} {% if w.known_block_count %} / {{ w.known_block_count }} {% endif %} @@ -206,10 +206,12 @@
Expected Seed: {{ w.expected_seed }}
@@ -219,14 +221,15 @@
-
+ +
{% if block_unknown_seeds and w.expected_seed != true %} {# Only show addresses if wallet seed is correct #} -
+
-
+
{% if w.cid != '4' %} {# DCR #}
@@ -248,75 +251,35 @@
-
+
-
-
- {% if w.cid in '6, 9' %} - {# XMR | WOW #} -
-
-
-
-
-
+
+
+
+
+
+
+
+ {% if w.cid in '6, 9' %} + {# XMR | WOW #}
-
{{ w.name }} Main Address:
+
Main Address:
{{ w.main_address }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ w.name }} Sub Address:
-
-
{{ w.deposit_address }}
-
-
-
- -
-
- -
-
-
-
- {% else %} -
-
-
-
-
-
+ {% else %}
-
{{ w.name }} Deposit Address:
+
Deposit Address:
{{ w.deposit_address }}
@@ -326,6 +289,7 @@
@@ -333,43 +297,46 @@
- {% endif %} - {% if w.cid == '1' %} {# PART #} + {% if w.cid in '1, 3, 6, 9' %} + {# PART | LTC | XMR | WOW | #}
+ {% if w.cid in '6, 9' %} + {# XMR | WOW #} +
+
+
+
Subaddress:
+
+
{{ w.deposit_address }}
+
+
+
+ +
+
+
-
{{ w.name }} Stealth Address:
+
Stealth Address:
{{ w.stealth_address }}
-
-
-
-
-
- {# / PART #} - {% elif w.cid == '3' %} - {# LTC #} -
-
-
-
-
-
+ {# / PART #} + {% elif w.cid == '3' %} + {# LTC #}
-
{{ w.name }} MWEB Address:
+
MWEB Address:
{{ w.mweb_address }}
@@ -378,17 +345,19 @@
+
-
-
-
-
- {% endif %} - {# / LTC #} -
+
+
+
+
+
+
+ {% endif %}
@@ -534,15 +503,15 @@ document.addEventListener('DOMContentLoaded', function() {
-
+
-
+
-
- +
+
- + + {% if w.cid == '3' %} {# LTC #} - + - {% endif %} - {% if w.cid == '1' %} + + {% elif w.cid == '1' %} {# PART #} - + + - - {% endif %} + + + + {% endif %} @@ -700,19 +673,21 @@ document.addEventListener('DOMContentLoaded', function() { {% endif %} - + + + {% if w.cid in '6, 9' %} {# XMR | WOW #} - - + {% else %} {% endif %}
@@ -554,22 +523,26 @@ document.addEventListener('DOMContentLoaded', function() {
{{ w.name }} {{ w.name }} Balance: {{ w.name }} Balance: {{ w.balance }} {{ w.ticker }}
{{ w.name }} {{ w.name }} MWEB Balance: {{ w.name }} MWEB Balance: {{ w.mweb_balance }} {{ w.ticker }}
{{ w.name }} {{ w.name }} Blind Balance: {{ w.name }} Blind Balance: {{ w.blind_balance }} {{ w.ticker }}
{{ w.name }} {{ w.name }} Anon Balance: {{ w.anon_balance }} {{ w.ticker }} {{ w.name }} Anon Balance: {{ w.anon_balance }} {{ w.ticker }}
{{ w.name }} Address:
Sweep All: - + Subtract Fee: - + @@ -781,25 +756,23 @@ document.addEventListener('DOMContentLoaded', function() {
-
+
-
+
- {% if w.cid not in '6, 9' %} - {# !XMR | WOW #} - {% if w.show_utxo_groups %} - {% else %} -
- {% endif %} {% endif %} {% if w.cid in '6, 9' %} {# XMR | WOW #}
+ {# / XMR | WOW #} + {% elif w.show_utxo_groups %} + {% else %} +
{% endif %} - {# / XMR | WOW #}
+
@@ -807,6 +780,7 @@ document.addEventListener('DOMContentLoaded', function() {
+
{% if w.cid not in '6, 9' %} {# !XMR | WOW #} @@ -817,15 +791,15 @@ document.addEventListener('DOMContentLoaded', function() {
-
+
-
- +
+
@@ -855,12 +829,12 @@ document.addEventListener('DOMContentLoaded', function() {
-
+
-
+