File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { ethers } from 'ethers' ;
2
+ import { get } from 'lodash' ;
2
3
3
4
import type { GasSettings } from '../config/schema' ;
4
5
import { getState , setState } from '../state' ;
@@ -130,7 +131,12 @@ export const clearSponsorLastUpdateTimestampMs = (
130
131
) => {
131
132
const state = getState ( ) ;
132
133
133
- if ( state . gasPriceStore [ chainId ] ! [ providerName ] ! . sponsorLastUpdateTimestampMs [ sponsorWalletAddress ] ) {
134
+ const sponsorLastUpdateTimestampMs = get (
135
+ state ,
136
+ `gasPriceStore[${ chainId } ][${ providerName } ].sponsorLastUpdateTimestampMs[${ sponsorWalletAddress } ]`
137
+ ) ;
138
+
139
+ if ( sponsorLastUpdateTimestampMs ) {
134
140
const { [ sponsorWalletAddress ] : _value , ...sponsorLastUpdateTimestampMs } =
135
141
state . gasPriceStore [ chainId ] ! [ providerName ] ! . sponsorLastUpdateTimestampMs ;
136
142
Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ export const processBatch = async (batch: ReadDapiWithIndexResponsesAndChainId)
220
220
// });
221
221
// });
222
222
223
+ // clearSponsorLastUpdateTimestampMs();
224
+
223
225
const feedsToUpdate = allFeeds . filter ( ( feed ) => feed . shouldUpdate ) ;
224
226
225
227
return Promise . allSettled ( chunk ( feedsToUpdate , FEEDS_TO_UPDATE_CHUNK_SIZE ) . map ( async ( feed ) => updateFeeds ( feed ) ) ) ;
You can’t perform that action at this time.
0 commit comments