From 3f6c854dd64a2a698cd21db54487eb229e66360b Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Mon, 20 Mar 2023 00:05:42 +0530 Subject: [PATCH] Added minimum FLO when doing token transfer --- index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.html b/index.html index 3d3a6cf..d262f34 100644 --- a/index.html +++ b/index.html @@ -1602,6 +1602,9 @@ `) document.getElementById('sender_tokens_wrapper').classList.remove('hidden') handleTokenSelection() + } else { + document.getElementById('sender_tokens_wrapper').classList.add('hidden') + clearSelection() } }).catch((error) => { notify(error, 'error'); @@ -1614,6 +1617,7 @@ getRef('tx_token_amount').value = '' getRef('flo_data_wrapper').classList.remove('hidden') getRef('flo_data_textarea').value = '' + getRef('tx_flo_amount').value = '' } function handleTokenSelection() { const selectedToken = document.getElementById('sender_tokens_wrapper').querySelector('input[type="radio"]:checked') @@ -1626,6 +1630,7 @@ getRef('tx_token_amount').classList.remove('hidden') getRef('tx_token_amount').placeholder = `${tokenName.charAt(0).toUpperCase() + tokenName.slice(1)} amount` getRef('tx_token_amount').setAttribute('max', tokenBalance) + getRef('tx_flo_amount').value = '0.001' } getRef('tx_token_amount').addEventListener('input', e => { const tokenAmount = parseFloat(e.target.value.trim()) @@ -1661,6 +1666,11 @@ ${loading ? html`` : balance} FLO + ${!loading && balance == 0 ? html` +

+ You don't have any FLO in your wallet. Please add some FLO to your wallet to send FLO. +

+ ` : ''} `)