-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ana/fix rewards updating #3235
Ana/fix rewards updating #3235
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3235 +/- ##
===========================================
+ Coverage 88.85% 88.86% +0.01%
===========================================
Files 125 125
Lines 1911 1913 +2
Branches 281 280 -1
===========================================
+ Hits 1698 1700 +2
Misses 206 206
Partials 7 7
|
src/components/common/TmBalance.vue
Outdated
@@ -147,6 +146,22 @@ export default { | |||
// query if successful or not as even an unsuccessful tx costs fees | |||
refetchNetworkOnly(this.$apollo.queries.overview) | |||
} | |||
}, | |||
userRewardsIncremented: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this happening every block if the user has delegations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not every block I think, but nearly yes
I am only missing the tests now, like I always do! 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why so complicated? There is a TableValidator already does fetch the rewards. Use the blocksubscription there once instead of on every LiValidator?
You can just call the functions directly: |
Fixed! All updating logic now in TableValidators. |
Closes #3095
Description:
I am getting close to fix this issue: making the rewards update by themselves, without refreshing.
The most significant changes for this are found in the API side. I will now push that branch too.
Still I wonder if the reason why I am getting this error actually lies on the FE:
I believe so. I tried in the playground the API with the
userRewardsIncremented
subscription implemented and it worked quite well.Thank you! 🚀
For contributor:
yarn changelog
for a guided process.Files changed
in the github PR explorerFor reviewer: