You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if you call Program.addEventListener, you only get subscribed to Anchor events at the default commitment level set in the Connection instance. And if you want to receive events at multiple commitment levels, you need to create a separate connection for each.
It looks like Connection.onLogs method provides a third optional commitment parameter so it is actually possible to subscribe to the same event at multiple commitment levels using a single connection.
It would be nice if Program.addEventListener method also took an optional commitment parameter so we could use a single Solana connection across the whole app. Right now, we are basically forced to create multiple connection instances just because Anchor doesn't support this.
The text was updated successfully, but these errors were encountered:
It would be nice if Program.addEventListener method also took an optional commitment parameter so we could use a single Solana connection across the whole app.
Sounds great! Feel free to create a PR for this, or let me know if you'd like me to add it.
Right now, if you call Program.addEventListener, you only get subscribed to Anchor events at the default commitment level set in the
Connection
instance. And if you want to receive events at multiple commitment levels, you need to create a separate connection for each.It looks like Connection.onLogs method provides a third optional
commitment
parameter so it is actually possible to subscribe to the same event at multiple commitment levels using a single connection.It would be nice if
Program.addEventListener
method also took an optionalcommitment
parameter so we could use a single Solana connection across the whole app. Right now, we are basically forced to create multiple connection instances just because Anchor doesn't support this.The text was updated successfully, but these errors were encountered: