Conversation
# Conflicts: # packages/ui/package.json # yarn.lock
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
...ages/ui/src/proposals/modals/AddNewProposal/components/SpecificParameters/RuntimeUpgrade.tsx
Outdated
Show resolved
Hide resolved
...ages/ui/src/proposals/modals/AddNewProposal/components/SpecificParameters/RuntimeUpgrade.tsx
Outdated
Show resolved
Hide resolved
| setValue('channelIncentivesPayout.expectedDataSizeFee', expectedDataSizeFee) | ||
| setValue('channelIncentivesPayout.expectedDataObjectStateBloatBond', expectedDataObjectStateBloatBond) |
There was a problem hiding this comment.
It's nice to have the objectCreationParamsContent and the objectCreationParamsSize validated separately, but to keep getSpecificParameters simple the payload object could be build here:
| 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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
|
@WRadoslaw more importantly the CI reports problems with the |
ephesusbranch