File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Sources/web3swift/Utils/EIP Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ extension Web3 {
289
289
guard let rawValue = comp. value,
290
290
let functionArgument = await parseFunctionArgument ( inputType,
291
291
rawValue. trimmingCharacters ( in: . whitespacesAndNewlines) ,
292
- chainID: code. chainID ?? 0 ,
292
+ chainID: code. chainID,
293
293
inputNumber: inputNumber)
294
294
else { continue }
295
295
@@ -348,7 +348,7 @@ extension Web3 {
348
348
349
349
private static func parseFunctionArgument( _ inputType: ABI . Element . ParameterType ,
350
350
_ rawValue: String ,
351
- chainID: BigUInt ,
351
+ chainID: BigUInt ? = Networks . Mainnet . chainID ,
352
352
inputNumber: Int ) async -> FunctionArgument ? {
353
353
var nativeValue : Any ?
354
354
switch inputType {
@@ -359,7 +359,7 @@ extension Web3 {
359
359
nativeValue = ethereumAddress
360
360
case . ensAddress( let ens) :
361
361
do {
362
- let web = await Web3 ( provider: InfuraProvider ( Networks . fromInt ( UInt ( chainID) ) ?? Networks . Mainnet ) !)
362
+ let web = await Web3 ( provider: InfuraProvider ( chainID == nil ? . Mainnet : . fromInt( UInt ( chainID! ) ) ) !)
363
363
let ensModel = ENS ( web3: web)
364
364
try await ensModel? . setENSResolver ( withDomain: ens)
365
365
let address = try await ensModel? . getAddress ( forNode: ens)
You can’t perform that action at this time.
0 commit comments