Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Let's say we are monitoring 5 symbols and we add one more symbol to our Global Settings.
The bot will cache it to
trailing-trade-cache
collection in our Mongo DB as usual and this symbol will show up in the frontend as expected.However, when we remove that symbol from the Global Settings, the symbols count will be different than the cached symbols in our database.
This is still expected but the pagination will have an issue when we reached like:
Hence, we can see only the first 12 symbols from the frontend and we will not be able to see the symbol number 13 because we were paginating our symbols based on the count of symbols that exists in Global Settings.
The correct behavior is to count the symbols from the
trailing-trade-cache
collection which is addressed by this PR.I also added an explanation for that when the count becomes different just to be clear.
Related Issue
#506
Motivation and Context
How Has This Been Tested?
Tests provided
Screenshots (if appropriate):