File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Thirdweb/Thirdweb.Extensions Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -651,7 +651,19 @@ public static async Task<List<BigInteger>> ERC721A_TokensOfOwnerIn(this Thirdweb
651651 /// <exception cref="ArgumentNullException">Thrown when the contract is null.</exception>
652652 public static async Task < BigInteger > ERC721_TotalSupply ( this ThirdwebContract contract )
653653 {
654- return contract == null ? throw new ArgumentNullException ( nameof ( contract ) ) : await ThirdwebContract . Read < BigInteger > ( contract , "totalSupply" ) ;
654+ if ( contract == null )
655+ {
656+ throw new ArgumentNullException ( nameof ( contract ) ) ;
657+ }
658+
659+ try
660+ {
661+ return await ThirdwebContract . Read < BigInteger > ( contract , "nextTokenIdToMint" ) ;
662+ }
663+ catch
664+ {
665+ return await ThirdwebContract . Read < BigInteger > ( contract , "totalSupply" ) ;
666+ }
655667 }
656668
657669 /// <summary>
You can’t perform that action at this time.
0 commit comments