File tree Expand file tree Collapse file tree
packages/extension/src/providers/ethereum/libs/transaction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,11 +60,15 @@ const decodeTx = async (
6060 tokenTo = decodedInfo . tokenTo ! ;
6161 }
6262 await marketData
63- . getMarketInfoByContracts ( [ tx . to ! ] , network . coingeckoPlatform ! )
63+ . getMarketInfoByContracts (
64+ [ tx . to ! . toLowerCase ( ) ] ,
65+ network . coingeckoPlatform ! ,
66+ )
6467 . then ( marketInfo => {
65- if ( marketInfo [ tx . to ! ] ) {
66- currentPriceUSD = marketInfo [ tx . to ! ] ! . current_price ?? 0 ;
67- CGToken = marketInfo [ tx . to ! ] ! . id ;
68+ if ( marketInfo [ tx . to ! . toLowerCase ( ) ] ) {
69+ currentPriceUSD =
70+ marketInfo [ tx . to ! . toLowerCase ( ) ] ! . current_price ?? 0 ;
71+ CGToken = marketInfo [ tx . to ! . toLowerCase ( ) ] ! . id ;
6872 }
6973 } ) ;
7074 } else {
@@ -82,7 +86,7 @@ const decodeTx = async (
8286 return {
8387 isContractCreation,
8488 dataHex : bufferToHex ( dataDecoder . data ) ,
85- toAddress : tx . to ! ,
89+ toAddress : tx . to ! . toLowerCase ( ) ,
8690 decodedHex : dataDecoder . decode ( ) . values ,
8791 decoded : dataDecoder . decode ( ) . decoded ,
8892 tokenDecimals,
You can’t perform that action at this time.
0 commit comments