11import SummaryItem from "next-common/components/summary/layout/item" ;
2- import Link from "next-common/components/link" ;
32import LoadableContent from "next-common/components/common/loadableContent" ;
43import NativeTokenSymbolAsset from "next-common/components/summary/polkadotTreasurySummary/common/nativeTokenSymbolAsset" ;
54import FiatPriceLabel from "next-common/components/summary/polkadotTreasurySummary/common/fiatPriceLabel" ;
65import { StatemintFellowShipTreasuryAccount } from "next-common/hooks/treasury/useAssetHubTreasuryBalance" ;
76import { useAssetHubApi } from "next-common/hooks/chain/useAssetHubApi" ;
87import useSubStorage from "next-common/hooks/common/useSubStorage" ;
8+ import { toPrecision } from "next-common/utils" ;
9+ import TokenSymbolAsset from "next-common/components/summary/polkadotTreasurySummary/common/tokenSymbolAsset" ;
10+ import { HOLLAR_DECIMALS , useFetchHollarBalance , ExternalLink } from "./common" ;
911
1012function useFetchFellowshipTreasuryBalance ( ) {
1113 const api = useAssetHubApi ( ) ;
@@ -22,30 +24,35 @@ function useFetchFellowshipTreasuryBalance() {
2224}
2325
2426export default function FellowshipTreasury ( ) {
25- const { balance, loading } = useFetchFellowshipTreasuryBalance ( ) ;
27+ const { balance : dotBalance , loading : dotLoading } =
28+ useFetchFellowshipTreasuryBalance ( ) ;
29+ const { balance : hollarBalance , loading : hollarLoading } =
30+ useFetchHollarBalance ( StatemintFellowShipTreasuryAccount ) ;
2631
2732 const Title = (
28- < >
29- < Link
30- href = { `https://assethub-polkadot.statescan.io/#/accounts/${ StatemintFellowShipTreasuryAccount } ` }
31- className = "text12Medium text-textTertiary hover:underline"
32- target = "_blank"
33- rel = "noreferrer"
34- >
35- Treasury ↗
36- </ Link >
37- </ >
33+ < ExternalLink
34+ href = { `https://assethub-polkadot.statescan.io/#/accounts/${ StatemintFellowShipTreasuryAccount } ` }
35+ >
36+ Treasury ↗
37+ </ ExternalLink >
3838 ) ;
3939
4040 return (
4141 < SummaryItem title = { Title } >
42- < LoadableContent isLoading = { loading } >
42+ < LoadableContent isLoading = { dotLoading || hollarLoading } >
4343 < div className = "flex flex-col gap-[4px]" >
4444 < div >
45- < FiatPriceLabel free = { balance } />
45+ < FiatPriceLabel free = { dotBalance } hollarBalance = { hollarBalance } />
4646 </ div >
47- < div className = "flex flex-col gap-y-1 !ml-0" >
48- < NativeTokenSymbolAsset free = { balance } />
47+ < div className = "flex items-center gap-x-1" >
48+ < NativeTokenSymbolAsset free = { dotBalance } />
49+ </ div >
50+ < div className = "flex items-center gap-x-1" >
51+ < TokenSymbolAsset
52+ amount = { toPrecision ( hollarBalance , HOLLAR_DECIMALS ) }
53+ symbol = "HOLLAR"
54+ type = "foreign"
55+ />
4956 </ div >
5057 </ div >
5158 </ LoadableContent >
0 commit comments