Skip to content

Commit

Permalink
fix: correct formula for sent amount is (sent - received + fee) not (…
Browse files Browse the repository at this point in the history
…- fee)
  • Loading branch information
tohrxyz committed Apr 22, 2023
1 parent 1f5a817 commit c73e4a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ fun TransactionHistoryTile(
.padding(horizontal = 10.dp, vertical = 5.dp)
){
// displays how much was sent/received
val netSpent = sent.toULong() - received.toULong() - fees.toULong()
val netSpent = sent.toULong() - received.toULong() + fees.toULong()
Text(
text = if(isPayment){ "- ${formatSats(netSpent.toString())} Sats"} else { "+ ${formatSats(received)} Sats"},
fontSize = 18.sp,
Expand Down Expand Up @@ -513,7 +513,7 @@ fun TransactionHistoryTile(
.padding(horizontal = 10.dp, vertical = 5.dp)
){
// displays how much was sent/received
val netSpent = sent.toULong() - received.toULong() - fees.toULong()
val netSpent = sent.toULong() - received.toULong() + fees.toULong()
Text(
text = if(isPayment){ "- ${formatSats(netSpent.toString())} Sats"} else { "+ ${formatSats(received)} Sats"},
fontSize = 18.sp,
Expand Down

0 comments on commit c73e4a2

Please sign in to comment.