-
Notifications
You must be signed in to change notification settings - Fork 274
Unhandled Exception: Invalid argument(s): Client is required to perform network actions #216
Comments
Can you post your call to |
(!transaction.isEIP1559 && gasPrice == null) this condition is the same with below if (!transaction.isEIP1559 && gasPrice == null) { so below can't run . |
I'm getting this as well since upgrade to 2.3.2. The same code works when rolling back to 2.3.1. |
Same here, my code works on version 2.3.1 but not on 2.3.2 |
Any update on this problem? |
The above code snippet is normal because we need the client to retrieve more information for transaction if missing, i used it without any error |
my code do not works on version 2.3.1 and 2.3.2 |
Thank you for the fix @simolus3 🙂 |
flutter
environment:
sdk: ">=2.12.0 <3.0.0"
provider: ^6.0.1
web3dart: ^2.3.2
http: ^0.13.4
web_socket_channel: ^2.1.0
====================================================================================================
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: Invalid argument(s): Client is required to perform network actions
#0 _fillMissingData (package:web3dart/src/core/transaction_signer.dart:32:5)
#1 Web3Client.signTransaction (package:web3dart/src/core/client.dart:316:26)
#2 Web3Client.sendTransaction (package:web3dart/src/core/client.dart:285:18)
#3 ContractLinking.addData (package:population/contract_linking.dart:98:5)
This if condition have a problem.
`
if (client == null &&
(transaction.nonce == null ||
transaction.maxGas == null ||
loadChainIdFromNetwork) ||
(!transaction.isEIP1559 && gasPrice == null)) {
throw ArgumentError('Client is required to perform network actions');
}
if (!transaction.isEIP1559 && gasPrice == null) {
gasPrice = await client!.getGasPrice();
}
`
The text was updated successfully, but these errors were encountered: