lisk-mobile
lisk-mobile copied to clipboard
Fix websocket connections roundtrip on new/delete transactions events
Expected behavior
The app should establish only 1 connection per API client for listening to new/delete transaction events.
Actual behavior
The app makes more than 100 subscriptions to the events each time the server notifies that a transaction is created or deleted (new.transactions
and delete.transactions
events).
The events subscriptions are on src/modules/Accounts/api/useAccountTransactionsQuery.js
.
Steps to reproduce
- Access to an account.
- Click on Send token button on the Home tab.
- Fill the send token form.
- Submit the transaction and go back to the home tab.
- Wait until the event is received.
Which version(s) does this affect? (Environment, OS, etc...)
Development, iOS and Android.