Skip to content

Commit

Permalink
fix: options.cacheOnChainConfig not working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
bolasblack committed Aug 23, 2024
1 parent fff8e2d commit b7c062b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/evmUtils/xlinkContractHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,13 @@ const getOnChainConfigs = async (
client,
chain,
configContractAddress,
).finally(() => {
).catch(err => {
queueMicrotask(() => {
if (cache != null && promise === cache.get(cacheKey)) {
cache.delete(cacheKey)
}
})
throw err
})
if (cache != null) {
cache.set(cacheKey, promise)
Expand Down

0 comments on commit b7c062b

Please sign in to comment.