Use historic BTC rate for expense items; allow BTC as currency #226

Merged
raucao merged 11 commits from feature/currencies into master 2025-02-16 14:50:26 +00:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit f02e5572ba - Show all commits
+1 -1
View File
@@ -5,7 +5,7 @@
<span class="date">{{fmt-date-localized expense.date}}:</span>
<span class="title">{{expense.title}}</span>
</h4>
<div class="amount">
<div class="amount" title="{{fmt-amount-sats-title expense.amountSats}}">
{{fmt-fiat-currency expense.amount expense.currency}}
</div>
<p class="description">
+11
View File
@@ -0,0 +1,11 @@
import { helper } from '@ember/component/helper';
export default helper(function fmtAmountSatsTitle(params) {
const amountSats = params[0];
if (typeof amountSats === 'number' && amountSats > 0) {
return `${amountSats} sats`;
} else {
return '';
}
});