From d51e1238d59fc417ccad1facd5d9f62944164b88 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Fri, 30 Jun 2023 15:18:40 +0530 Subject: [PATCH] Update index.html --- docs/index.html | 54 +++++++++---------------------------------------- 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/docs/index.html b/docs/index.html index b27f261..08466dd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -214,7 +214,7 @@ required animate> -
@@ -458,36 +458,6 @@
-
-
- - - - - - - - - - -
Rupee token
-
-

- - - - - - - Top-up - -
{ buttonLoader('trade_button', false) getRef('trade_button').disabled = true @@ -2021,10 +1990,8 @@ const target = e.target.closest('button') const fraction = parseFloat(target.value) if (tradeType === 'buy') { - getRef('get_total').value = toFixed(fraction * allTokens['rupee'].net) - getRef('get_quantity').value = toFixed((allTokens['rupee'].net * fraction)) + getRef('get_quantity').value = toFixed((allTokens['FLO'].net * fraction)) } else { - getRef('get_total').value = toFixed(fraction * allTokens[selectedAsset].net) getRef('get_quantity').value = toFixed(allTokens[selectedAsset].net * fraction) } @@ -2407,7 +2374,7 @@ case 'confirm_trade_popup': const asset = pagesData.params.asset; const quantity = parseFloat(getRef('get_quantity').value) - const total = formatAmount(parseFloat(getRef('get_total').value)) + const setPrice = formatAmount(parseFloat(getRef('set_price').value)) getRef('confirm_trade__title').textContent = `${tradeType} ${asset}` getRef('confirm_trade__details').innerHTML = `
@@ -2416,7 +2383,7 @@

At price

- ${total} ${asset} + ${setPrice} ${asset}
`; break; @@ -2479,7 +2446,6 @@ document.body.classList.add('is-signed-in'); if (getRef('market_asset_rates')) getRef('market_asset_rates').parentNode.remove() - location.hash = `#/exchange` getRef('user_popup_button').addEventListener('click', () => openPopup('user_popup')); getRef('trade_button').addEventListener('click', () => openPopup('confirm_trade_popup')); accountDetails = acc @@ -2492,7 +2458,7 @@ if (acc.subAdmin) console.info("logged in as subAdmin"); - // rupee balance init + // FLO balance init allTokens[floGlobals.currency] = { total: 0, locked: 0, @@ -2509,7 +2475,7 @@ acc.sellOrders.forEach(({ asset, quantity }) => { allTokens[asset].locked += quantity }) - allTokens[floGlobals.currency].locked = acc.buyOrders.reduce((a, x) => a + x.quantity * x.maxPrice, 0) + allTokens[floGlobals.currency].locked = acc.buyOrders.reduce((a, x) => a + x.quantity * x.price, 0) for (const token in allTokens) { allTokens[token].net = allTokens[token].total - allTokens[token].locked }