Render currencies etc.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { helper } from '@ember/component/helper';
|
||||
|
||||
export default helper(function fmtFiatCurrency(params) {
|
||||
const formatter = new Intl.NumberFormat('en-US', {
|
||||
style: 'currency',
|
||||
currency: params[1] || 'EUR',
|
||||
minimumFractionDigits: 2
|
||||
})
|
||||
return formatter.format(params[0]);
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
import { helper } from '@ember/component/helper';
|
||||
|
||||
export default helper(function satsToBtc(amount/*, hash*/) {
|
||||
return amount / 100000000;
|
||||
});
|
||||
Reference in New Issue
Block a user