@@ -15,6 +15,7 @@ import { useFacade } from "../../../../data/facades";
15
15
import { CurrencyUtils } from "@ironfish/sdk" ;
16
16
import { useQueries } from "@tanstack/react-query" ;
17
17
import { setStringAsync } from "expo-clipboard" ;
18
+ import { useHideBalances } from "@/hooks/useHideBalances" ;
18
19
19
20
const ExternalLinkIcon = ( props : IconProps ) => (
20
21
< Icon { ...props } name = "external-link-outline" />
@@ -53,6 +54,7 @@ const CopyableText = ({ text, style }: { text: string; style?: any }) => {
53
54
export default function TransactionDetails ( ) {
54
55
const { hash } = useLocalSearchParams < { hash : string } > ( ) ;
55
56
const facade = useFacade ( ) ;
57
+ const hideBalances = useHideBalances ( ) ;
56
58
57
59
const transactionQuery = facade . getTransaction . useQuery (
58
60
{
@@ -180,10 +182,12 @@ export default function TransactionDetails() {
180
182
{ isReceived ? "Received" : "Sent" }
181
183
</ Text >
182
184
< Text category = "h2" style = { styles . mainAmount } >
183
- { CurrencyUtils . render (
184
- ( mainAmount < 0n ? - mainAmount : mainAmount ) . toString ( ) ,
185
- false ,
186
- ) } { " " }
185
+ { hideBalances
186
+ ? "•••••"
187
+ : CurrencyUtils . render (
188
+ ( mainAmount < 0n ? - mainAmount : mainAmount ) . toString ( ) ,
189
+ false ,
190
+ ) } { " " }
187
191
{ mainAssetName }
188
192
</ Text >
189
193
< Text category = "s1" appearance = "hint" style = { styles . timestamp } >
@@ -239,7 +243,8 @@ export default function TransactionDetails() {
239
243
Fee
240
244
</ Text >
241
245
< Text style = { styles . value } >
242
- { CurrencyUtils . render ( transaction . fee ) } $IRON
246
+ { hideBalances ? "•••••" : CurrencyUtils . render ( transaction . fee ) } { " " }
247
+ $IRON
243
248
</ Text >
244
249
</ View >
245
250
< Divider style = { styles . divider } />
0 commit comments