Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/utils/validation.js
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | try { | ||||
currency.settingsValidation.fiatCurrency.includes( | currency.settingsValidation.fiatCurrency.includes( | ||||
settings.fiatCurrency, | settings.fiatCurrency, | ||||
); | ); | ||||
return isValid; | return isValid; | ||||
} catch (err) { | } catch (err) { | ||||
return false; | return false; | ||||
} | } | ||||
}; | }; | ||||
export const formatSavedBalance = swBalance => { | |||||
try { | |||||
if (swBalance == (undefined || null)) { | |||||
return 'N/A'; | |||||
} else { | |||||
return new Number(swBalance).toLocaleString('en-US', { | |||||
maximumFractionDigits: 2, | |||||
}); | |||||
} | |||||
} catch (err) { | |||||
return 'N/A'; | |||||
} | |||||
}; |