From c8ccf352f23196eb89fa8a8606466edc557472af Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:03:31 +0800 Subject: [PATCH] fix: update tax display logic --- .../renderer/src/modules/power/transaction-section/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/renderer/src/modules/power/transaction-section/index.tsx b/apps/renderer/src/modules/power/transaction-section/index.tsx index 7031a13bb..d68806662 100644 --- a/apps/renderer/src/modules/power/transaction-section/index.tsx +++ b/apps/renderer/src/modules/power/transaction-section/index.tsx @@ -162,8 +162,7 @@ const BalanceRenderer = ({ amount: NonNullable["data"]>[number]["powerToken"] tax: NonNullable["data"]>[number]["tax"] }) => { - // tax free or 100% tax - const showTax = tax !== "0" && tax !== amount + const hideTax = sign === "-" || tax === "0" return (
{sign} {amount} - {showTax && ( + {!hideTax && ( (-{tax})