From 6a469d6a752c71f92a9fa5555f07ec6489a919d5 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 21 Feb 2022 11:09:44 -0600 Subject: [PATCH] Allow empty values for fiat conversion --- app/views/admin/donations/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/donations/index.html.erb b/app/views/admin/donations/index.html.erb index d4f633d..1752c78 100644 --- a/app/views/admin/donations/index.html.erb +++ b/app/views/admin/donations/index.html.erb @@ -20,8 +20,8 @@ <%= donation.user.address %> <%= sats_to_btc donation.amount_sats %> BTC - <%= number_to_currency donation.amount_eur / 100, unit: "" %> - <%= number_to_currency donation.amount_usd / 100, unit: "" %> + <% if donation.amount_eur.present? %><%= number_to_currency donation.amount_eur / 100, unit: "" %><% end %> + <% if donation.amount_usd.present? %><%= number_to_currency donation.amount_usd / 100, unit: "" %><% end %> <%= donation.public_name %> <%= donation.paid_at ? donation.paid_at.strftime("%Y-%m-%d") : "" %> <%= link_to 'Show', admin_donation_path(donation), class: 'btn btn-sm btn-gray' %>