bug fixes
This commit is contained in:
parent
b8647ffa03
commit
33a5e556f8
@ -76,8 +76,9 @@ strong:not(:last-of-type) {
|
|||||||
line-height: normal;
|
line-height: normal;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
background-color: khaki;
|
background-color: khaki;
|
||||||
border-radius: 1rem;
|
border-radius: 0.5rem;
|
||||||
color: rgba(0, 0, 0, 0.8);
|
font-weight: 500;
|
||||||
|
color: rgba(0, 0, 0, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|||||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -72,8 +72,9 @@ strong {
|
|||||||
line-height: normal;
|
line-height: normal;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
background-color: khaki;
|
background-color: khaki;
|
||||||
border-radius: 1rem;
|
border-radius: 0.5rem;
|
||||||
color: rgba(0, 0, 0, 0.8);
|
font-weight: 500;
|
||||||
|
color: rgba(0, 0, 0, 0.7);
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@ -49,10 +49,6 @@ function continueWalletTopup() {
|
|||||||
msg: `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}`,
|
msg: `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}`,
|
||||||
ecl: 'H'
|
ecl: 'H'
|
||||||
}))
|
}))
|
||||||
// fetch(`https://upiqr.in/api/qr?name=cashier&vpa=${cashierUPI[cashier]}`).then(res => {
|
|
||||||
// res.text().then(data => getRef('topup_wallet__qr_code').innerHTML = data)
|
|
||||||
// .catch(err => console.error(err));
|
|
||||||
// }).catch(err => console.error(err));
|
|
||||||
showChildElement('topup_wallet_process', 1)
|
showChildElement('topup_wallet_process', 1)
|
||||||
getRef('topup_wallet__txid').focusIn();
|
getRef('topup_wallet__txid').focusIn();
|
||||||
}
|
}
|
||||||
@ -390,8 +386,15 @@ function confirmTopUp(button) {
|
|||||||
notify("Completed request", 'success');
|
notify("Completed request", 'success');
|
||||||
hidePopup()
|
hidePopup()
|
||||||
}).catch(error => console.error(error))
|
}).catch(error => console.error(error))
|
||||||
}).catch(error => console.error(error))
|
.finally(() => buttonLoader(button, false));
|
||||||
}).catch(error => console.error(error))
|
}).catch(error => {
|
||||||
|
console.error(error)
|
||||||
|
buttonLoader(button, false);
|
||||||
|
})
|
||||||
|
}).catch(error => {
|
||||||
|
buttonLoader(button, false);
|
||||||
|
console.error(error)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getRef('top_up__reason_selector').addEventListener('change', e => {
|
getRef('top_up__reason_selector').addEventListener('change', e => {
|
||||||
@ -668,7 +671,7 @@ function buttonLoader(id, show) {
|
|||||||
if (potentialTarget) potentialTarget.remove();
|
if (potentialTarget) potentialTarget.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function refreshBalance(button) {
|
async function refreshBalance(button) {
|
||||||
if (button)
|
if (button)
|
||||||
buttonLoader(button, true)
|
buttonLoader(button, true)
|
||||||
floTokenAPI.getBalance(myFloID).then((balance = 0) => {
|
floTokenAPI.getBalance(myFloID).then((balance = 0) => {
|
||||||
@ -677,18 +680,21 @@ function refreshBalance(button) {
|
|||||||
if (button)
|
if (button)
|
||||||
buttonLoader(button, false)
|
buttonLoader(button, false)
|
||||||
})
|
})
|
||||||
floBlockchainAPI.getBalance(myFloID).then(balance => {
|
try {
|
||||||
const [beforeDecimal, afterDecimal = '00'] = String(balance).split('.')
|
const [floBal, floRates] = await Promise.all([floBlockchainAPI.getBalance(myFloID), floExchangeAPI.getRates('FLO')])
|
||||||
|
const [beforeDecimal, afterDecimal = '00'] = String(floBal).split('.')
|
||||||
getRef('flo_balance').innerHTML = `<span><b>${beforeDecimal}</b></span>.<span>${afterDecimal}</span>`
|
getRef('flo_balance').innerHTML = `<span><b>${beforeDecimal}</b></span>.<span>${afterDecimal}</span>`
|
||||||
if (balance < floGlobals.settings.user_flo_threshold) {
|
if (floBal < floGlobals.settings.user_flo_threshold) {
|
||||||
getRef('low_user_flo_warning').textContent = `Your FLO balance is low. You will receive ${floGlobals.settings.send_user_flo} FLO by deducting equivalent rupee tokens.`;
|
getRef('low_user_flo_warning').textContent = `Your FLO balance is low. You will receive ${floGlobals.settings.send_user_flo} FLO of worth ₹${parseFloat(floRates.rate.toFixed(2))} deducted from top-up amount.`;
|
||||||
getRef('low_user_flo_warning').classList.remove('hide');
|
getRef('low_user_flo_warning').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
getRef('low_user_flo_warning').classList.add('hide');
|
getRef('low_user_flo_warning').classList.add('hide');
|
||||||
}
|
}
|
||||||
if (button)
|
if (button)
|
||||||
buttonLoader(button, false)
|
buttonLoader(button, false)
|
||||||
})
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArrayOfSavedIds() {
|
function getArrayOfSavedIds() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user