Render currencies etc.

This commit is contained in:
2020-07-09 17:07:05 +02:00
parent eaac245f4e
commit 4849a755dc
6 changed files with 51 additions and 11 deletions
+10
View File
@@ -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]);
});
+5
View File
@@ -0,0 +1,5 @@
import { helper } from '@ember/component/helper';
export default helper(function satsToBtc(amount/*, hash*/) {
return amount / 100000000;
});