Skip to content

Commit 59390ea

Browse files
committed
fix getall loop end on chains without multicall3 deployed
1 parent af0243a commit 59390ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Assets/Thirdweb/Core/Scripts/ERC1155.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public async Task<List<NFT>> GetAll(QueryAllParams queryParams = null)
125125
{
126126
ThirdwebDebug.LogWarning("Unable to fetch using Multicall3, likely not deployed on this chain, falling back to single queries.");
127127
allNfts = new List<NFT>();
128-
for (int i = start; i <= end; i++)
128+
for (int i = start; i < end; i++)
129129
allNfts.Add(await Get(i.ToString()));
130130
}
131131
return allNfts;

Assets/Thirdweb/Core/Scripts/ERC721.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public async Task<List<NFT>> GetAll(QueryAllParams queryParams = null)
125125
catch
126126
{
127127
ThirdwebDebug.LogWarning("Unable to fetch using Multicall3, likely not deployed on this chain, falling back to single queries.");
128-
for (int i = start; i <= end; i++)
128+
for (int i = start; i < end; i++)
129129
allNfts.Add(await Get(i.ToString()));
130130
}
131131
return allNfts;

0 commit comments

Comments
 (0)