From 7d87345e9806d27194fd348f3b97d9662837898f Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Tue, 28 Dec 2021 02:46:09 -0300 Subject: [PATCH] Prevent passing negative nonce because of prefetch --- src/useErigonHooks.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index 737c6d7..2a38e09 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -531,6 +531,10 @@ const getTransactionBySenderAndNonceFetcher = async ({ sender, nonce, }: TransactionBySenderAndNonceKey): Promise => { + if (nonce < 0) { + return undefined; + } + const result = (await provider.send("ots_getTransactionBySenderAndNonce", [ sender, nonce,