From 330f9ad8a34ad84cf995487987ca4c1404657d6d Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Mon, 6 Jun 2022 20:04:23 +0530 Subject: [PATCH] minor UI fix --- scripts/fn_ui.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/fn_ui.js b/scripts/fn_ui.js index 6ebad99..aa8d2a8 100644 --- a/scripts/fn_ui.js +++ b/scripts/fn_ui.js @@ -707,11 +707,13 @@ const render = { if (getRef('topup_wallet__qr_wrapper').open) { getRef('topup_steps').querySelectorAll('.conditional').forEach(e => e.remove()); } else { - const amount = parseFloat(getRef('request_cashier_amount').value.trim()); - const conditionalSteps = getRef('conditional_steps_template').content.cloneNode(true); - conditionalSteps.querySelector('.amount').textContent = formatAmount(amount); - conditionalSteps.querySelector('.tx-code').setAttribute('value',floGlobals.txCode); - getRef('topup_steps').children[1].after(conditionalSteps) + if (getRef('topup_steps').children.length < 4) { + const amount = parseFloat(getRef('request_cashier_amount').value.trim()); + const conditionalSteps = getRef('conditional_steps_template').content.cloneNode(true); + conditionalSteps.querySelector('.amount').textContent = formatAmount(amount); + conditionalSteps.querySelector('.tx-code').setAttribute('value',floGlobals.txCode); + getRef('topup_steps').children[1].after(conditionalSteps) + } } } };