Bug fixes

This commit is contained in:
sairaj mote 2023-06-15 20:01:11 +05:30
parent 9e1cf97fef
commit 2c5a905899

View File

@ -2303,10 +2303,12 @@
} }
getRef('get_private_key_field').addEventListener('input', debounce(e => { getRef('get_private_key_field').addEventListener('input', debounce(e => {
if (e.target.isValid) { if (e.target.tagName === 'SM-INPUT') {
checkSenderBalance() if (e.target.isValid) {
} else { checkSenderBalance()
resetBalance() } else {
resetBalance()
}
} }
}, 100)) }, 100))
@ -2421,7 +2423,7 @@
if (rangeUnderflow) if (rangeUnderflow)
e.target.setAttribute('error-text', `Minimum 0.00000001 FLO allowed`) e.target.setAttribute('error-text', `Minimum 0.00000001 FLO allowed`)
if (rangeOverflow) if (rangeOverflow)
e.target.setAttribute('error-text', `You can send FLO upto ${parseFloat(getRef('sender_balance').textContent) - floGlobals.fee} only`) e.target.setAttribute('error-text', `You can send FLO upto ${parseFloat(document.getElementById('sender_balance').textContent) - floGlobals.fee} only`)
}) })
function renderBalance(balance = 0, loading = false) { function renderBalance(balance = 0, loading = false) {