From 8d4a2e79b860c2ecdd2698feb104906df6ce2e64 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Thu, 2 Sep 2021 21:28:28 +0530 Subject: [PATCH] update refresh button refresh button also refreshed account details --- public/home.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/home.html b/public/home.html index 66670d7..77d1405 100644 --- a/public/home.html +++ b/public/home.html @@ -209,11 +209,13 @@ }).catch(error => console.error(error)) } - function refresh() { + function refresh(init = false) { console.info("refresh"); list_buy(); list_sell(); list_txns(); + if (init || document.getElementById('user-container').style.display === "block") + account(); } function account() { @@ -342,10 +344,7 @@ .catch(error => console.error(o, error))) }; - (function init() { - account(); - refresh(); - })(); + refresh(true);