From f852f42de5f3a1db6b791d8822f5e3fbffda7795 Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Sat, 27 Apr 2019 16:42:17 -0400 Subject: [PATCH] fix to avoid caching unconfirmed txs --- app/api/coreApi.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/api/coreApi.js b/app/api/coreApi.js index a1bbc47..9a5904c 100644 --- a/app/api/coreApi.js +++ b/app/api/coreApi.js @@ -125,6 +125,10 @@ function tryCacheThenRpcApi(cache, cacheKey, cacheMaxAge, rpcApiFunction, cacheC } function shouldCacheTransaction(tx) { + if (!tx.confirmations) { + return false; + } + if (tx.confirmations < 1) { return false; }