@@ -35,7 +35,7 @@ import useGetAccountantAccounts, { Account } from '../hooks/useGetAccountantAcco
35
35
import useGetAccountantPendingTransfers , {
36
36
PendingTransfer ,
37
37
} from '../hooks/useGetAccountantPendingTransfers' ;
38
- import useTokenData , { TokenDataEntry } from '../hooks/useTokenData' ;
38
+ import { TokenDataByChainAddress , TokenDataEntry } from '../hooks/useTokenData' ;
39
39
import {
40
40
ACCOUNTANT_CONTRACT_ADDRESS ,
41
41
CHAIN_ICON_MAP ,
@@ -47,6 +47,15 @@ import CollapsibleSection from './CollapsibleSection';
47
47
import { ExplorerTxHash } from './ExplorerTxHash' ;
48
48
import Table from './Table' ;
49
49
50
+ const NTT_ACCOUNTANT_TOKEN_ADDRESS_OVERRIDE : {
51
+ [ chain : number ] : { [ tokenAddress : string ] : string } ;
52
+ } = {
53
+ 1 : {
54
+ cf5f3614e2cd9b374558f35c7618b25f0d306d5e749b7d29cc030a1a15686238 :
55
+ '6927fdc01ea906f96d7137874cdd7adad00ca35764619310e54196c781d84d5b' ,
56
+ } ,
57
+ } ;
58
+
50
59
type PendingTransferForAcct = PendingTransfer & { isEnqueuedInGov : boolean } ;
51
60
type AccountWithTokenData = Account & {
52
61
tokenData : TokenDataEntry ;
@@ -382,10 +391,12 @@ const MemoizedAccountantSearch = memo(AccountantSearch);
382
391
383
392
function Accountant ( {
384
393
governorInfo,
394
+ tokenData,
385
395
accountantAddress,
386
396
isNTT,
387
397
} : {
388
398
governorInfo ?: CloudGovernorInfo ;
399
+ tokenData : TokenDataByChainAddress | null ;
389
400
accountantAddress : string ;
390
401
isNTT ?: boolean ;
391
402
} ) {
@@ -402,8 +413,6 @@ function Accountant({
402
413
403
414
const accountsInfo = useGetAccountantAccounts ( accountantAddress ) ;
404
415
405
- const tokenData = useTokenData ( isNTT ) ;
406
-
407
416
const governorInfoIsDefined = ! ! governorInfo ;
408
417
409
418
const pendingTransfersForAcct : PendingTransferForAcct [ ] = useMemo (
@@ -441,7 +450,13 @@ function Accountant({
441
450
442
451
const accountsWithTokenData : AccountWithTokenData [ ] = useMemo ( ( ) => {
443
452
return accountsInfo . map < AccountWithTokenData > ( ( a ) => {
444
- const thisTokenData = tokenData ?. [ `${ a . key . token_chain } /${ a . key . token_address } ` ] ;
453
+ let token_chain = a . key . token_chain ;
454
+ let token_address = a . key . token_address ;
455
+ if ( isNTT ) {
456
+ token_address =
457
+ NTT_ACCOUNTANT_TOKEN_ADDRESS_OVERRIDE [ token_chain ] ?. [ token_address ] || token_address ;
458
+ }
459
+ const thisTokenData = tokenData ?. [ `${ token_chain } /${ token_address } ` ] ;
445
460
if ( ! thisTokenData )
446
461
return {
447
462
...a ,
@@ -467,7 +482,7 @@ function Accountant({
467
482
tvlTvm,
468
483
} ;
469
484
} ) ;
470
- } , [ accountsInfo , tokenData ] ) ;
485
+ } , [ accountsInfo , tokenData , isNTT ] ) ;
471
486
const tvlTvmPerChain : ChainTvlTvm [ ] = useMemo (
472
487
( ) =>
473
488
Object . values (
0 commit comments