Skip to content

Commit 4887d8f

Browse files
committed
show v1 and v2 delegate factory in stats
1 parent aadf438 commit 4887d8f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

modules/contracts/eth-sdk.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const config: EthSdkConfig = {
5555
pot: '0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7',
5656
vat: '0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B',
5757
voteDelegateFactory: '0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0',
58+
voteDelegateFactoryOld: '0xD897F108670903D1d6070fcf818f9db3615AF272',
5859
voteProxyFactory: '0x6FCD258af181B3221073A96dD90D1f7AE7eEc408',
5960
voteProxyFactoryOld: '0xa63E145309cadaa6A903a19993868Ef7E85058BE',
6061
vow: '0xA950524441892A31ebddF91d3cEEFa04Bf454466'

modules/delegates/components/DelegatesSystemInfo.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export function DelegatesSystemInfo({
2626
className?: string;
2727
}): React.ReactElement {
2828
const delegateFactoryAddress = useContractAddress('voteDelegateFactory');
29+
const oldDelegateFactoryAddress = useContractAddress('voteDelegateFactoryOld');
2930
const { network } = useWeb3();
3031

3132
const { data: totalMkr } = useTotalSupply(Tokens.MKR);
@@ -64,7 +65,7 @@ export function DelegatesSystemInfo({
6465
)
6566
},
6667
{
67-
title: 'Total Delegators',
68+
title: 'Total delegators',
6869
id: 'total-delegators-system-info',
6970
value: stats.totalDelegators
7071
}
@@ -78,7 +79,7 @@ export function DelegatesSystemInfo({
7879
<Card variant="compact">
7980
<StackLayout gap={3}>
8081
<Flex sx={{ justifyContent: 'space-between', flexDirection: 'row' }}>
81-
<Text sx={{ fontSize: 3, color: 'textSecondary' }}>Delegate Factory</Text>
82+
<Text sx={{ fontSize: 3, color: 'textSecondary' }}>V2 delegate factory</Text>
8283
{delegateFactoryAddress ? (
8384
<EtherscanLink type="address" showAddress hash={delegateFactoryAddress} network={network} />
8485
) : (
@@ -87,6 +88,16 @@ export function DelegatesSystemInfo({
8788
</Box>
8889
)}
8990
</Flex>
91+
<Flex sx={{ justifyContent: 'space-between', flexDirection: 'row' }}>
92+
<Text sx={{ fontSize: 3, color: 'textSecondary' }}>V1 delegate factory</Text>
93+
{oldDelegateFactoryAddress ? (
94+
<EtherscanLink type="address" showAddress hash={oldDelegateFactoryAddress} network={network} />
95+
) : (
96+
<Box sx={{ width: 6 }}>
97+
<SkeletonThemed />
98+
</Box>
99+
)}
100+
</Flex>
90101
{statsItems.map(item => (
91102
<Flex key={item.id} sx={{ justifyContent: 'space-between', flexDirection: 'row' }}>
92103
<Text sx={{ fontSize: 3, color: 'textSecondary' }}>{item.title}</Text>

0 commit comments

Comments
 (0)