take user to the onboard page if chip is not set

This commit is contained in:
Bilal
2020-09-18 19:12:05 +03:00
committed by Senad Uka
parent 77469a469b
commit a9730dd69a
8 changed files with 193 additions and 11 deletions

View File

@@ -1,6 +1,10 @@
const formatMoney = (amount) => {
const formatted = Number.parseFloat(amount).toFixed(2);
return `${formatted} KM`;
const formatMoney = (amount, og) => {
const decimalPlaces = parseInt(og['chip_scale']);
const symbol = og['chip_symbol'];
const prefixed = og['chip_prefixed'];
const formatted = Number.parseFloat(amount).toFixed(decimalPlaces);
return prefixed ? `${symbol} ${formatted}` : `${formatted} ${symbol}`;
}
const formatTime = (amount) => {