Automatically claim initial rewards (new_user & email_verified) when … #6807
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#6807
Loading…
Reference in a new issue
No description provided.
Delete branch "6788-automatically-claim-initial-rewards"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
…accessing creating channel, edit channel and upload
PR Checklist
Please check all that apply to this PR using "x":
PR Type
What kind of change does this PR introduce?
Fixes
Issue Number: https://github.com/lbryio/lbry-desktop/issues/6788
What is the current behavior?
N/A
What is the new behavior?
When a user access to create new channel, edit channel, or upload, we will try to automatically claim the rewards email_verified & new_user.
Other information
Thanks again @Ruk33 ! We'll get a code review on this soon, but looks right according to our conversation.
Room for optimization to not call this every time?
This will get called on every entry. Tom did mention something similar:
@tzarebczan, if there's no harm to the unnecessary API call, I guess we can just merge it.
Maybe check
selectUnclaimedRewards
first before sending the request?Yea, I thought that was happening..it's probably not a big deal. That's why
import { selectUnclaimedRewardValue, selectIsClaimingInitialRewards } from 'redux/selectors/rewards';
was brought in on publish page, but it's never used. @Ruk33 take another look please?@Ruk33 I think ball is in your court on this one
Hello guys, thanks for the review. Not sure how much performance can we gain since when we call
doClaimInitialRewards
, internally, it callsdoClaimRewardType
which do checks for already claimed rewards and if it's claimed already, it does nothing. In any case, will update to first make the checks and then call only if required.Hello @kauffj , thanks for the follow-up. On it!
Bug: email verified without user consent
I see what you mean and it is indeed redundant. On closer inspection, I think the issue is this:
Email Verified
despite not having rewards approved (I really didn't want to verify this email, to keep it for testing scenario purposes.).