Skip to content

Commit c8ccf35

Browse files
committed
fix: update tax display logic
1 parent 7e670a3 commit c8ccf35

File tree

1 file changed

+2
-3
lines changed
  • apps/renderer/src/modules/power/transaction-section

1 file changed

+2
-3
lines changed

apps/renderer/src/modules/power/transaction-section/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ const BalanceRenderer = ({
162162
amount: NonNullable<ReturnType<typeof useWalletTransactions>["data"]>[number]["powerToken"]
163163
tax: NonNullable<ReturnType<typeof useWalletTransactions>["data"]>[number]["tax"]
164164
}) => {
165-
// tax free or 100% tax
166-
const showTax = tax !== "0" && tax !== amount
165+
const hideTax = sign === "-" || tax === "0"
167166
return (
168167
<div
169168
className={cn("flex items-center", {
@@ -173,7 +172,7 @@ const BalanceRenderer = ({
173172
>
174173
{sign}
175174
<Balance className="mr-1">{amount}</Balance>
176-
{showTax && (
175+
{!hideTax && (
177176
<span className="text-xs text-gray-500">
178177
(-<Balance>{tax}</Balance>)
179178
</span>

0 commit comments

Comments
 (0)