Skip to content

Remove lead-owned apps#4648

Merged
Lezek123 merged 3 commits intoJoystream:apps-metaprotocolfrom
Lezek123:remove-lead-owned-apps
Feb 20, 2023
Merged

Remove lead-owned apps#4648
Lezek123 merged 3 commits intoJoystream:apps-metaprotocolfrom
Lezek123:remove-lead-owned-apps

Conversation

@Lezek123
Copy link
Copy Markdown
Contributor

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 20, 2023

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

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Feb 20, 2023 at 8:08AM (UTC)

const newApp = new App({
name,
id: appId,
ownerMember: memberId ? new Membership({ id: memberId }) : undefined,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't comment on line 16 on GitHub, but there is a redundant condition and a comment.

  // memberId is required for MemberRemark, but not for LeadRemark
  if (event.method === 'MemberRemarked' && !memberId) {
    inconsistentState("memberId wasn't provided")
  }

We should update it as well

@@ -55,29 +54,20 @@ export async function processUpdateAppMessage(
store: DatabaseManager,
event: SubstrateEvent,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unused parameter

@@ -102,29 +92,20 @@ export async function processDeleteAppMessage(
store: DatabaseManager,
event: SubstrateEvent,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unused parameter

assert.equal(appsByName?.[0].ownerMember.id, member.memberId.toString())
assert.equal(appsByName?.[0]?.category, appMetadata.category)
assert.equal(appsByName?.[0]?.oneLiner, appMetadata.oneLiner)
assert.equal(appsByName?.[0]?.description, appMetadata.description)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe I'm nitpicking here, but we could rename all the variables like appOwnedByMember to just app or newApp. Just for the sake of clarity? WDYT? We don't need to differentiate anymore between the app owned by the lead and the app owned by members.

@@ -43,35 +43,5 @@ export async function deleteApp({ api, query }: FlowProps): Promise<void> {
)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same question here

@@ -61,51 +61,5 @@ export async function updateApp({ api, query }: FlowProps): Promise<void> {
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same question here

@Lezek123 Lezek123 requested a review from drillprop February 20, 2023 07:52
Copy link
Copy Markdown
Contributor

@drillprop drillprop left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of it! LGTM!

@Lezek123 Lezek123 merged commit 2dbe4e7 into Joystream:apps-metaprotocol Feb 20, 2023
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