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
The related functions used in the citycoins lib for those checks returns undefined if the fetch is unsuccessful. The check for this incorrectly interprets false and undefined as the same state and informs the user they cannot claim when there is an error fetching the data.
The incorrect state is intermittent depending on if the fetch to the API is successful or not, although it has been reported twice recently through Discord DMs.
Expected behavior
The state should indicate if there is a) a failure in the query or b) if the user is unable to claim.
This could likely be remedied by checking if the value is undefined or false and showing the appropriate state.
Additional context
This may apply to other parts of the logic in this component, and possibly other components.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the logic for claiming mining rewards, the UI checks both
is-block-winner
andcan-claim-mining-reward
to determine if the user can claim or not.ui/src/components/mining/ClaimMiningRewards.js
Lines 95 to 128 in 4b05c79
The related functions used in the citycoins lib for those checks returns
undefined
if the fetch is unsuccessful. The check for this incorrectly interpretsfalse
andundefined
as the same state and informs the user they cannot claim when there is an error fetching the data.ui/src/lib/citycoins.js
Lines 91 to 111 in 4b05c79
To Reproduce
The incorrect state is intermittent depending on if the fetch to the API is successful or not, although it has been reported twice recently through Discord DMs.
Expected behavior
The state should indicate if there is a) a failure in the query or b) if the user is unable to claim.
This could likely be remedied by checking if the value is undefined or false and showing the appropriate state.
Additional context
This may apply to other parts of the logic in this component, and possibly other components.
The text was updated successfully, but these errors were encountered: