@@ -703,12 +703,11 @@ export class TokenRatesController extends StaticIntervalPollingController<TokenR
703703 chainId : Hex ;
704704 nativeCurrency : string ;
705705 } ) : Promise < ContractMarketData > {
706- let contractNativeInformations ;
707706 const tokenPricesByTokenAddress = await reduceInBatchesSerially <
708707 Hex ,
709708 Record < Hex , EvmAssetWithMarketData >
710709 > ( {
711- values : [ ...tokenAddresses ] . sort ( ) ,
710+ values : [ ...tokenAddresses , getNativeTokenAddress ( chainId ) ] . sort ( ) ,
712711 batchSize : TOKEN_PRICES_BATCH_SIZE ,
713712 eachBatch : async ( allTokenPricesByTokenAddress , batch ) => {
714713 const tokenPricesByTokenAddressForBatch = (
@@ -734,26 +733,26 @@ export class TokenRatesController extends StaticIntervalPollingController<TokenR
734733 } ,
735734 initialResult : { } ,
736735 } ) ;
737- contractNativeInformations = tokenPricesByTokenAddress ;
736+ // const contractNativeInformations = tokenPricesByTokenAddress;
738737
739738 // fetch for native token
740- if ( tokenAddresses . length === 0 ) {
741- const contractNativeInformationNative =
742- await this . #tokenPricesService. fetchTokenPrices ( {
743- assets : [
744- {
745- chainId,
746- address : getNativeTokenAddress ( chainId ) ,
747- } ,
748- ] ,
749- currency : nativeCurrency ,
750- } ) ;
751-
752- contractNativeInformations = {
753- [ getNativeTokenAddress ( chainId ) ] : contractNativeInformationNative [ 0 ] ,
754- } ;
755- }
756- return Object . entries ( contractNativeInformations ) . reduce (
739+ // if (tokenAddresses.length === 0) {
740+ // const contractNativeInformationNative =
741+ // await this.#tokenPricesService.fetchTokenPrices({
742+ // assets: [
743+ // {
744+ // chainId,
745+ // address: getNativeTokenAddress(chainId),
746+ // },
747+ // ],
748+ // currency: nativeCurrency,
749+ // });
750+
751+ // contractNativeInformations = {
752+ // [getNativeTokenAddress(chainId)]: contractNativeInformationNative[0],
753+ // };
754+ // }
755+ return Object . entries ( tokenPricesByTokenAddress ) . reduce (
757756 ( obj , [ tokenAddress , token ] ) => {
758757 obj = {
759758 ...obj ,
0 commit comments