diff --git a/index.html b/index.html
index 9306570..c7e5c40 100644
--- a/index.html
+++ b/index.html
@@ -1102,7 +1102,7 @@
getRef('rupee_balance').innerHTML = `${beforeDecimal}.${afterDecimal}`
})
floBlockchainAPI.getBalance(myFloID).then(balance => {
- const [beforeDecimal, afterDecimal] = String(balance).split('.')
+ const [beforeDecimal, afterDecimal = '0'] = String(balance).split('.')
getRef('flo_balance').innerHTML = `${beforeDecimal}.${afterDecimal}`
})
if (floGlobals.isSubAdmin) {
diff --git a/scripts/fn_ui.js b/scripts/fn_ui.js
index dc4ab95..21af97f 100644
--- a/scripts/fn_ui.js
+++ b/scripts/fn_ui.js
@@ -381,6 +381,8 @@ function getFloIdTitle(floID) {
}
function formatAmount(amount = 0) {
+ if (!amount)
+ return '0';
return amount.toLocaleString(`en-IN`, { style: 'currency', currency: 'INR' })
}
@@ -429,6 +431,7 @@ const render = {
},
cashierRequestCard(details) {
const { time, senderID, message: { mode, amount = 0 }, note, tag, vectorClock } = details;
+ console.log(details);
const clone = getRef('cashier_request_template').content.cloneNode(true).firstElementChild;
clone.id = vectorClock;
const status = tag || note; //status tag for completed, note for rejected