Skip to content

Nicaea types 2nd update#823

Merged
mnaamani merged 8 commits intoJoystream:nicaeafrom
Lezek123:nicaea-types-2nd-update
Jun 29, 2020
Merged

Nicaea types 2nd update#823
mnaamani merged 8 commits intoJoystream:nicaeafrom
Lezek123:nicaea-types-2nd-update

Conversation

@Lezek123
Copy link
Contributor

@Lezek123 Lezek123 commented Jun 26, 2020

This PR (currently a draft) intoduces changes to @joystream/types, Pioneer and CLI that should make those compatible with the runtime build after #728.

Related issue: #816
Current commit I was basing the changes on: 960abce

Updates to #707 and #742 will also be required (already did them locally to properly test if everything works)

Besides that I'm not introducing any UI adjustments related to the fact that lead is hireable yet, so:

  • Lead is still also considered a "Worker"
  • Lead opening is considered to be a standard working group opening

There is a separate issue related to that (#726) which I'm going to work on later.

@Lezek123 Lezek123 marked this pull request as ready for review June 29, 2020 13:01
Copy link
Member

@mnaamani mnaamani left a comment

Choose a reason for hiding this comment

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

Left some comments but those can be tackled in separate PR. Not critical.


if (!optLead.isSome) {
return null;
if (!optLeadId.isSome) {
Copy link
Member

Choose a reason for hiding this comment

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

I've done similar checks, but I realize now its more straightforward to test optLeadId.isNone


if (!profile) {
throw new Error(`Group lead profile not found! (member id: ${lead.member_id.toNumber()})`);
if (!leadWorker.is_active) {
Copy link
Member

Choose a reason for hiding this comment

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

We should really output some error message here, it would indicate invalid state in the runtime to have a set lead and the worker not existing.

);
const leadWorker = leadWorkerLink.value;

if (!leadWorker.is_active) {
Copy link
Member

Choose a reason for hiding this comment

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

again if this check fails, there is bad state in the chain, and we should log it at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants