From 40c254756577c8cf503c83d110bc9c96d5ae58d4 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sat, 19 Feb 2022 15:25:37 -0300 Subject: [PATCH] Extract unit name --- src/components/TransactionValue.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/TransactionValue.tsx b/src/components/TransactionValue.tsx index 618ec2e..c7a8d2c 100644 --- a/src/components/TransactionValue.tsx +++ b/src/components/TransactionValue.tsx @@ -6,6 +6,7 @@ type TransactionValueProps = { value: BigNumber; decimals?: number; hideUnit?: boolean; + unitName?: string; }; /** @@ -22,16 +23,17 @@ const TransactionValue: React.FC = ({ value, decimals = 18, hideUnit, + unitName = "ETH", }) => { const formattedValue = formatValue(value, decimals); return ( {formattedValue} - {!hideUnit && " Ether"} + {!hideUnit && ` ${unitName}`} ); };