Skip to content

🤑 Channel payouts proposal#3906

Merged
thesan merged 9 commits intoephesusfrom
feature/payouts-proposal
Dec 21, 2022
Merged

🤑 Channel payouts proposal#3906
thesan merged 9 commits intoephesusfrom
feature/payouts-proposal

Conversation

@WRadoslaw
Copy link
Copy Markdown
Contributor

@WRadoslaw WRadoslaw commented Nov 29, 2022

⚠️ once ready merge this PR into a new ephesus branch

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
dao ✅ Ready (Inspect) Visit Preview Dec 19, 2022 at 6:17PM (UTC)
pioneer-2 ✅ Ready (Inspect) Visit Preview Dec 19, 2022 at 6:17PM (UTC)
pioneer-2-storybook ✅ Ready (Inspect) Visit Preview Dec 19, 2022 at 6:17PM (UTC)
pioneer-app 🔄 Building (Inspect) Dec 19, 2022 at 6:17PM (UTC)

Comment on lines +34 to +35
setValue('channelIncentivesPayout.expectedDataSizeFee', expectedDataSizeFee)
setValue('channelIncentivesPayout.expectedDataObjectStateBloatBond', expectedDataObjectStateBloatBond)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's nice to have the objectCreationParamsContent and the objectCreationParamsSize validated separately, but to keep getSpecificParameters simple the payload object could be build here:

Suggested change
setValue('channelIncentivesPayout.expectedDataSizeFee', expectedDataSizeFee)
setValue('channelIncentivesPayout.expectedDataObjectStateBloatBond', expectedDataObjectStateBloatBond)
setValue('channelIncentivesPayout.payload', {
uploaderAccount: creator.controllerAccount,
objectCreationParams: { size_: objectCreationParamsSize, ipfsContentId: objectCreationParamsContent },
expectedDataSizeFee: expectedDataSizeFee,
expectedDataObjectStateBloatBond: expectedDataObjectStateBloatBond,
})

(with const [objectCreationParamsSize, objectCreationParamsContent] = watch(['objectCreationParamsSize', 'objectCreationParamsContent']))

WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is kinda validated separately. Both of them are validated at the time of upload. I choose that way because FileDropzone has a nicer validation UI than just plain red text.

So at the time of setting values both size and params content are validated.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I got that but what I'm proposing is to keep these separate validations but also to have channelIncentivesPayout.payload (not validated) but set (has a react hook form data) inside the useEffect in ChannelIncentivesPayout instead of inside getSpecificParameters

@thesan
Copy link
Copy Markdown
Collaborator

thesan commented Dec 2, 2022

@WRadoslaw more importantly the CI reports problems with the @joystream/js or the patch... I thought I left a comment about that yesterday but it looks like it got lost due to bad network 😢

@thesan thesan added the ephesus label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants