We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Great repo !
Infura no longer supports the old API, now we have to access through https://mainnet.infura.io/v3/<PROJECT_ID>
I updated the project accordingly with the following pieces of code and my Project ID obtained through Infura dashboard:
EtherWallet.swift private let web3Main = Web3.InfuraMainnetWeb3("<PROJECT ID>")
private let web3Main = Web3.InfuraMainnetWeb3("<PROJECT ID>")
Web3.swift (unchanged)
public static func InfuraMainnetWeb3(accessToken: String? = nil) -> web3 { let infura = InfuraProvider(Networks.Mainnet, accessToken: accessToken)! return web3(provider: infura) }
Web3+Infura.swift
public class InfuraProvider: Web3HttpProvider { public init?(_ net:Networks, accessToken token: String? = nil, keystoreManager manager: KeystoreManager? = nil) { var requestURLstring = "https://" + net.name + ".infura.io/v3/" if token != nil { requestURLstring = requestURLstring + token! } let providerURL = URL(string: requestURLstring) super.init(providerURL!, network: net, keystoreManager: manager) } ... }
Requesting the balance with EtherWallet.balance throws the following error.
EtherWallet.balance
EtherWalletTest[3957:62791] CredStore - performQuery - Error copying matching creds. Error=-25300, query={ class = inet; "m_Limit" = "m_LimitAll"; ptcl = htps; "r_Attributes" = 1; sdmn = "Project ID is required in the URL"; srvr = "mainnet.infura.io"; sync = syna; }
It seems that the project ID is missing in the call, but printing requestURLstring shows the correct URL with the access token.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Great repo !
Infura no longer supports the old API, now we have to access through https://mainnet.infura.io/v3/<PROJECT_ID>
I updated the project accordingly with the following pieces of code and my Project ID obtained through Infura dashboard:
EtherWallet.swift
private let web3Main = Web3.InfuraMainnetWeb3("<PROJECT ID>")
Web3.swift (unchanged)
Web3+Infura.swift
Requesting the balance with
EtherWallet.balance
throws the following error.It seems that the project ID is missing in the call, but printing requestURLstring shows the correct URL with the access token.
The text was updated successfully, but these errors were encountered: