From b7c062b21ea239d743f86cee82c48e0636e6e05a Mon Sep 17 00:00:00 2001 From: c4605 Date: Sat, 24 Aug 2024 00:37:12 +0100 Subject: [PATCH] fix: `options.cacheOnChainConfig` not working properly --- src/evmUtils/xlinkContractHelpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evmUtils/xlinkContractHelpers.ts b/src/evmUtils/xlinkContractHelpers.ts index 70f3231..472f7f4 100644 --- a/src/evmUtils/xlinkContractHelpers.ts +++ b/src/evmUtils/xlinkContractHelpers.ts @@ -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)