File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import { fetchWebconfig } from "../services/webconfig";
12
12
export async function getServerSideProps ( ) {
13
13
const webconfig = fetchWebconfig ( ) ;
14
14
const results = await Promise . all ( [
15
- Treasuries . fetchList ( ) ,
15
+ // V1 no longer used
16
+ Treasuries . fetchList ( ) . then ( list => list . filter ( type => type !== 'V1' ) ) ,
16
17
Blocks . fetchLast ( ) ,
17
18
] ) ;
18
19
const names = results [ 0 ] ;
Original file line number Diff line number Diff line change @@ -67,9 +67,15 @@ export const Treasuries = {
67
67
? null
68
68
: new ethers . Contract ( token . address , abiERC20 , jsonRpc ) ;
69
69
for ( const [ contractAddress , contractType ] of mapAddresses . entries ( ) ) {
70
- const tokenBalance = tokenContract
71
- ? await tokenContract . balanceOf ( contractAddress )
72
- : await jsonRpc . getBalance ( contractAddress ) ;
70
+ let tokenBalance ;
71
+ // The V1 treasury no longer holds any tokens
72
+ if ( contractType === TreasuryType . V1 ) {
73
+ tokenBalance = 0 ;
74
+ } else {
75
+ tokenBalance = tokenContract
76
+ ? await tokenContract . balanceOf ( contractAddress )
77
+ : await jsonRpc . getBalance ( contractAddress ) ;
78
+ }
73
79
74
80
const value = withDecimals ( tokenBalance . toString ( ) , token . decimals ) ;
75
81
console . log ( contractType , tokenSymbol , value ) ;
You can’t perform that action at this time.
0 commit comments