From 04e4811437e82cbb84aa35cfd639294f40b6cab8 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Thu, 14 Oct 2021 23:09:00 -0600 Subject: [PATCH] Hopefully fix bug where add card prompt stay after adding card --- www/assets/js/account.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/www/assets/js/account.js b/www/assets/js/account.js index 92bb351..a3f630c 100644 --- a/www/assets/js/account.js +++ b/www/assets/js/account.js @@ -116,6 +116,8 @@ function displayAccountInfo() { if (success.payments_setup === false) { $("#addPaymentMethodBox").css("display", ""); + } else { + $("#addPaymentMethodBox").css("display", "none"); } $("#accountupdateform input#name").val(success.name); @@ -278,9 +280,17 @@ function openCheckoutWindowToSaveCard(onaccountpage) { // on get message from browser // only message we should get is "kill me" if (params.data.msg == "kill me") { - initAccountPage(); closeBrowser(); } + initAccountPage(); } ); + + // refresh a bit while user adds card + setTimeout(initAccountPage, 1000 * 10); + setTimeout(initAccountPage, 1000 * 20); + setTimeout(initAccountPage, 1000 * 30); + setTimeout(initAccountPage, 1000 * 40); + setTimeout(initAccountPage, 1000 * 50); + setTimeout(initAccountPage, 1000 * 60); } \ No newline at end of file