<% 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); %>
<%= formattedCrypto %>
<%= ob.polyT(`cryptoCurrencies.${serverCur}`) %>
<% if (userCurrencyValidity === 'VALID' && ob.userCurrency !== serverCur) { %>
<%= formattedFiat %>
<%= ob.polyT('wallet.valueInCurrencyLabel', { currency: ob.userCurrency }) %>
<% } %>
<% if (typeof ob.transactionCount !== 'undefined') { %>
<%= ob.transactionCount %>
<%= ob.polyT('wallet.transactionsLabel') %>
<% } %>