Skip to content

Commit 6ef31ae

Browse files
committed
fix getall skipping last token id
1 parent c985e10 commit 6ef31ae

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
@@ -94,7 +94,7 @@ public async Task<List<NFT>> GetAll(QueryAllParams queryParams = null)
9494
}
9595
// TODO: Add Multicall
9696
List<NFT> allNfts = new List<NFT>();
97-
for (int i = start; i < end; i++)
97+
for (int i = start; i <= end; i++)
9898
allNfts.Add(await Get(i.ToString()));
9999
return allNfts;
100100
}

Assets/Thirdweb/Core/Scripts/ERC721.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public async Task<List<NFT>> GetAll(QueryAllParams queryParams = null)
102102
catch (System.Exception)
103103
{
104104
List<NFT> allNfts = new List<NFT>();
105-
for (int i = start; i < end; i++)
105+
for (int i = start; i <= end; i++)
106106
allNfts.Add(await Get(i.ToString()));
107107
return allNfts;
108108
}

0 commit comments

Comments
 (0)