Show fees of Lightning transactions #122

Merged
raucao merged 4 commits from feature/lightning_fees into master 2023-05-10 12:27:25 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 34849b28b0 - Show all commits

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>