Skip to content
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

fix: check if empty rewards list before render #1582

Merged
merged 1 commit into from
Nov 16, 2023
Merged

fix: check if empty rewards list before render #1582

merged 1 commit into from
Nov 16, 2023

Conversation

maparr
Copy link
Contributor

@maparr maparr commented Nov 15, 2023

It closes an issue when we don't have rewards and trying to render the list

before the rewards statement worked because we did a map of rewards, right now, we are doing an items map and then checking the items and layers in it.

@maparr maparr self-assigned this Nov 15, 2023
@maparr maparr added the bug Something isn't working label Nov 15, 2023
Copy link

Compiled Binaries

@monikasmolarek
Copy link
Collaborator

Ok, but now after updating proving opts the rewards list gets re-rendered: I mean it disappears, and after 2 seconds it appears again. Would it be a quick and easy fix @maparr ?

@maparr
Copy link
Contributor Author

maparr commented Nov 16, 2023

Ok, but now after updating proving opts the rewards list gets re-rendered: I mean it disappears, and after 2 seconds it appears again. Would it be a quick and easy fix @maparr?

With each update to the node-config, we initiate a node restart. This essentially fetches new data from the node. While I'm open to avoiding a re-render, I don't currently see a solution and prefer not to cache the previous state, which would require additional support.

From the user's perspective, when they update the node config, they should be aware that a node restart or update is expected. While it's not a critical moment from my viewpoint, a true resolution would involve redesigning how we display node/smeshing statuses, particularly on the Smeshing screen.

Currently, the Smeshing screen experiences a freeze with a blocked button during updates. One potential improvement is to remove the right-side panel until the update is complete. However, be aware that this might not completely eliminate the glitch.

Copy link
Collaborator

@monikasmolarek monikasmolarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works as expected😊

@brusherru
Copy link
Member

I mean it disappears, and after 2 seconds it appears again. Would it be a quick and easy fix @maparr ?

It is impossible until we have IDs for rewards (spacemeshos/api#272).
That's why we need to clean up the list and then fetch it once again.

Copy link
Member

@brusherru brusherru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@brusherru brusherru merged commit d5f107d into develop Nov 16, 2023
8 checks passed
@brusherru brusherru deleted the fix/1570 branch November 16, 2023 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants