-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
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
SocketProvider does not receive messages #188
Comments
My goal is to check if a certain transaction was mined or confirmed. Is this possible? If not, I will just check for pending transactions... |
@barrasso I'll study this problem in the next few days and fix it. Perhaps you need to set some delay between connecting and subscribing to get rid of it now. Also, I will expand the functionality of the Infura websocket provider |
@BaldyAsh I tried with a long delay between connecting and subscribing... still no dice. Thanks for the help. |
@barrasso found what is wrong. Now Infura websocket subscription requests should include your Infura PROJECT_ID. Web3swift project id will be set by default, but it will be possible to set your own |
@BaldyAsh Cool now I was able to connect to my own project using the default let provider = WebsocketProvider.connectToSocket("wss://ropsten.infura.io/ws/v3/MY_PROJ_ID", delegate: self) However, the default I can do a public func writeMessage(method: InfuraWebsocketMethod, params: [Encodable]) throws {
let request = JSONRPCRequestFabric.prepareRequest(method, parameters: params)
let encoder = JSONEncoder()
let requestData = try encoder.encode(request)
writeMessage(requestData)
} |
I have setup the
Web3SocketDelegate
according to the Usage docs and tests.I have successfully connected to the socket, however, I am unable to get any sort of messages (even when using different types of filters and subscriptions).
Steps to reproduce:
In the console, I see
websocket is connected
. But after sending some transactions, I don't receive any socket messages or events.The text was updated successfully, but these errors were encountered: