% const getTextSize = function(str) { if (str.length > 23) { return 'tx5'; } else if (str.length > 19) { return 'tx4'; } else if (str.length > 14) { return 'tx3'; } else { return 'tx2'; } }; const serverCur = ob.currencyMod.getServerCurrency().code; const formattedCrypto = ob.formatUnitlessCryptoAmount(ob.balance); const cryptoTextSize = getTextSize(formattedCrypto); const formattedFiat = ob.currencyMod.convertAndFormatCurrency(ob.balance, serverCur, ob.userCurrency); const userCurrencyValidity = ob.currencyMod.getCurrencyValidity(ob.userCurrency); const fiatTextSize = getTextSize(formattedFiat); %>