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)
99
99
List < NFT > allNfts = await rawTokenData . ToNFTList ( ) ;
100
100
return allNfts ;
101
101
}
102
- catch ( System . Exception e )
102
+ catch ( System . Exception )
103
103
{
104
104
List < NFT > allNfts = new List < NFT > ( ) ;
105
105
for ( int i = start ; i < end ; i ++ )
@@ -463,7 +463,7 @@ public async Task<ClaimConditions> GetActive()
463
463
464
464
var data = await TransactionManager . ThirdwebRead < DropERC721Contract . GetClaimConditionByIdFunction , DropERC721Contract . GetClaimConditionByIdOutputDTO > (
465
465
contractAddress ,
466
- new DropERC721Contract . GetClaimConditionByIdFunction ( ) { }
466
+ new DropERC721Contract . GetClaimConditionByIdFunction ( ) { ConditionId = id . ReturnValue1 }
467
467
) ;
468
468
469
469
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
43
43
public static async Task < TransactionReceipt > ThirdwebWriteRawResult < TWFunction > ( string contractAddress , TWFunction functionMessage , BigInteger ? weiValue = null )
44
44
where TWFunction : FunctionMessage , new ( )
45
45
{
46
- functionMessage . FromAddress = await ThirdwebManager . Instance . SDK . wallet . GetAddress ( ) ;
47
46
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 ( ) ;
52
51
53
52
if (
54
53
ThirdwebManager . Instance . SDK . options . gasless != null
@@ -109,6 +108,7 @@ public static async Task<TransactionReceipt> ThirdwebWriteRawResult<TWFunction>(
109
108
}
110
109
else
111
110
{
111
+ var transactionHandler = ThirdwebManager . Instance . SDK . nativeSession . web3 . Eth . GetContractTransactionHandler < TWFunction > ( ) ;
112
112
return await transactionHandler . SendRequestAndWaitForReceiptAsync ( contractAddress , functionMessage ) ;
113
113
}
114
114
}
You can’t perform that action at this time.
0 commit comments