WIP show fees of Lightning transactions

This commit is contained in:
Râu Cao 2023-05-01 15:15:23 +02:00
parent 8ce5f9708f
commit 34849b28b0
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
2 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ class WalletController < ApplicationController
tx["received"] = true
else
tx["amount_sats"] = tx["value"] || tx["amt"]
tx["fee"] = tx["type"] == "paid_invoice" ? tx["fee"] : nil
tx["datetime"] = Time.at(tx["timestamp"].to_i)
tx["title"] = tx["type"] == "paid_invoice" ? "Sent" : "Received"
tx["description"] = tx["memo"] || tx["description"]

View File

@ -35,7 +35,8 @@
</p>
<p class="col-span-4 md:col-span-1 md:text-right mb-0">
<span class="col-span-2 md:col-span-1 text-sm text-gray-500">
<%= tx["datetime"].strftime("%B %e, %H:%M") %>
<%= tx["datetime"].strftime("%B %e, %H:%M") -%>
<% if tx["fee"] && (tx["fee"] > 0) %>, Fee: <%= tx["fee"] %> sats<% end %>
</span>
</p>
</li>