diff --git a/basicswap/templates/offer_new_1.html b/basicswap/templates/offer_new_1.html index e85d32c..2b2c309 100644 --- a/basicswap/templates/offer_new_1.html +++ b/basicswap/templates/offer_new_1.html @@ -283,15 +283,15 @@ if (document.readyState === 'loading') {
-

Rate

-
-
- {{ select_rate_svg | safe }} -
- -
-
- Get Rate Inferred: +

Rate

+
+
+
+ {{ select_rate_svg | safe }} +
+ +
+
@@ -306,7 +306,6 @@ if (document.readyState === 'loading') {
- {% if debug_mode == true %}
@@ -414,181 +413,204 @@ if (document.readyState === 'loading') {
- + xhr_rate.open('POST', '/json/rate'); + xhr_rate.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr_rate.send(params); +} + +document.addEventListener("DOMContentLoaded", function() { + const coin_from = document.getElementById('coin_from').value; + const coin_to = document.getElementById('coin_to').value; + const swap_type = document.getElementById('swap_type'); + set_swap_type_enabled(coin_from, coin_to, swap_type); +}); + {% include 'footer.html' %}