From d8f782b1283f2fa8c9fa4ab2cc295026477984bd Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Wed, 5 Apr 2023 02:14:42 +0530 Subject: [PATCH] Bug fixes --- index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index d262f34..8521e72 100644 --- a/index.html +++ b/index.html @@ -775,6 +775,7 @@ case 'get_private_key_popup': getRef('get_private_key').classList.remove('hidden') renderElem(getRef('transaction_result'), html``) + getRef('confirm_transaction_button').disabled = true break; case 'retrieve_flo_id_popup': getRef('recovered_flo_id_wrapper').classList.add('hidden') @@ -870,6 +871,7 @@ } }) } + function buttonLoader(id, show) { const button = typeof id === 'string' ? getRef(id) : id; button.disabled = show; @@ -879,6 +881,7 @@ easing: 'ease' } if (show) { + button.parentNode.append(createElement('sm-spinner')) button.animate([ { clipPath: 'circle(100%)', @@ -886,13 +889,9 @@ { clipPath: 'circle(0)', }, - ], animOptions).onfinish = e => { - e.target.commitStyles() - e.target.cancel() - } - button.parentNode.append(createElement('sm-spinner')) + ], animOptions) } else { - button.style = '' + button.getAnimations().forEach(anim => anim.cancel()) const potentialTarget = button.parentNode.querySelector('sm-spinner') if (potentialTarget) potentialTarget.remove(); }