File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Assets/Thirdweb/Core/Scripts Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public async Task<List<NFT>> GetAll(QueryAllParams queryParams = null)
9999 List < NFT > allNfts = await rawTokenData . ToNFTList ( ) ;
100100 return allNfts ;
101101 }
102- catch ( System . Exception e )
102+ catch ( System . Exception )
103103 {
104104 List < NFT > allNfts = new List < NFT > ( ) ;
105105 for ( int i = start ; i < end ; i ++ )
@@ -463,7 +463,7 @@ public async Task<ClaimConditions> GetActive()
463463
464464 var data = await TransactionManager . ThirdwebRead < DropERC721Contract . GetClaimConditionByIdFunction , DropERC721Contract . GetClaimConditionByIdOutputDTO > (
465465 contractAddress ,
466- new DropERC721Contract . GetClaimConditionByIdFunction ( ) { }
466+ new DropERC721Contract . GetClaimConditionByIdFunction ( ) { ConditionId = id . ReturnValue1 }
467467 ) ;
468468
469469 return new ClaimConditions ( )
Original file line number Diff line number Diff line change @@ -43,12 +43,11 @@ public static async Task<TransactionResult> ThirdwebWrite<TWFunction>(string con
4343 public static async Task < TransactionReceipt > ThirdwebWriteRawResult < TWFunction > ( string contractAddress , TWFunction functionMessage , BigInteger ? weiValue = null )
4444 where TWFunction : FunctionMessage , new ( )
4545 {
46- functionMessage . FromAddress = await ThirdwebManager . Instance . SDK . wallet . GetAddress ( ) ;
4746 functionMessage . AmountToSend = weiValue ?? 0 ;
48-
49- var transactionHandler = ThirdwebManager . Instance . SDK . nativeSession . web3 . Eth . GetContractTransactionHandler < TWFunction > ( ) ;
50- var gas = await transactionHandler . EstimateGasAsync ( contractAddress , functionMessage ) ;
51- functionMessage . Gas = gas . Value < 100000 ? 100000 : gas ;
47+ var gasEstimator = new Nethereum . Web3 . Web3 ( ThirdwebManager . Instance . SDK . nativeSession . lastRPC ) . Eth . GetContractTransactionHandler < TWFunction > ( ) ;
48+ var gas = await gasEstimator . EstimateGasAsync ( contractAddress , functionMessage ) ;
49+ functionMessage . Gas = gas . Value < 100000 ? 100000 : gas . Value ;
50+ functionMessage . FromAddress = await ThirdwebManager . Instance . SDK . wallet . GetAddress ( ) ;
5251
5352 if (
5453 ThirdwebManager . Instance . SDK . options . gasless != null
@@ -109,6 +108,7 @@ public static async Task<TransactionReceipt> ThirdwebWriteRawResult<TWFunction>(
109108 }
110109 else
111110 {
111+ var transactionHandler = ThirdwebManager . Instance . SDK . nativeSession . web3 . Eth . GetContractTransactionHandler < TWFunction > ( ) ;
112112 return await transactionHandler . SendRequestAndWaitForReceiptAsync ( contractAddress , functionMessage ) ;
113113 }
114114 }
You can’t perform that action at this time.
0 commit comments