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 {
289289 guard let rawValue = comp. value,
290290 let functionArgument = await parseFunctionArgument ( inputType,
291291 rawValue. trimmingCharacters ( in: . whitespacesAndNewlines) ,
292- chainID: code. chainID ?? 0 ,
292+ chainID: code. chainID,
293293 inputNumber: inputNumber)
294294 else { continue }
295295
@@ -348,7 +348,7 @@ extension Web3 {
348348
349349 private static func parseFunctionArgument( _ inputType: ABI . Element . ParameterType ,
350350 _ rawValue: String ,
351- chainID: BigUInt ,
351+ chainID: BigUInt ? = Networks . Mainnet . chainID ,
352352 inputNumber: Int ) async -> FunctionArgument ? {
353353 var nativeValue : Any ?
354354 switch inputType {
@@ -359,7 +359,7 @@ extension Web3 {
359359 nativeValue = ethereumAddress
360360 case . ensAddress( let ens) :
361361 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! ) ) ) !)
363363 let ensModel = ENS ( web3: web)
364364 try await ensModel? . setENSResolver ( withDomain: ens)
365365 let address = try await ensModel? . getAddress ( forNode: ens)
You can’t perform that action at this time.
0 commit comments