fixed issue with js converting decimal values to exponentials

This commit is contained in:
sairaj mote 2024-02-13 17:55:42 +05:30
parent c6ce1876b2
commit ff4f9317a3
3 changed files with 21 additions and 21 deletions

View File

@ -2618,8 +2618,8 @@
if (tokenReceivers.length) { if (tokenReceivers.length) {
const consent = await getConfirmation(`Confirm transaction`, { const consent = await getConfirmation(`Confirm transaction`, {
message: ` message: `
Sending ${selectedToken.value} tokens to \n\n ${tokenReceivers.map(r => `${r}: ${bulkTokenReceivers[r]} ${selectedToken.value}`).join('\n')} Sending ${selectedToken.value} tokens to \n\n ${tokenReceivers.map(r => `${r}: ${bulkTokenReceivers[r]} ${selectedToken.value}`).join('\n')}
`, `,
confirmText: 'Send', confirmText: 'Send',
}) })
if (!consent) return; if (!consent) return;
@ -2630,19 +2630,19 @@
showTransactionResult(true, null, { showTransactionResult(true, null, {
title: `Multiple transactions have been initiated`, title: `Multiple transactions have been initiated`,
description: html` description: html`
<ul class="grid gap-0-5"> <ul class="grid gap-0-5">
${tokenReceivers.map((receiver, index) => html` ${tokenReceivers.map((receiver, index) => html`
<li> <li>
<a href=${`${floBlockchainAPI.current_server}tx/${transactionIds[receiver]}`} target="_blank"> <a href=${`${floBlockchainAPI.current_server}tx/${transactionIds[receiver]}`} target="_blank">
Check ${receiver} (${bulkTokenReceivers[receiver]} ${selectedToken.value}) transaction Check ${receiver} (${bulkTokenReceivers[receiver]} ${selectedToken.value}) transaction
</a> </a>
</li> </li>
`)} `)}
</ul> </ul>
` `
}); });
} else { } else {
const floData = `send ${bulkTokenReceivers[tokenReceivers[0]]} ${selectedToken.value}#` const floData = `send ${bulkTokenReceivers[tokenReceivers[0]].toFixed(10)} ${selectedToken.value}#`
if (await hasUnconfirmedTransactions(sender)) return if (await hasUnconfirmedTransactions(sender)) return
transactionId = await floBlockchainAPI.writeData(sender, floData, privKey, tokenReceivers[0]) transactionId = await floBlockchainAPI.writeData(sender, floData, privKey, tokenReceivers[0])
showTransactionResult(true, transactionId); showTransactionResult(true, transactionId);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long