Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Gracefully handle actions by `Lead` as `ContentActor` #4855

Closed zeeshanakram3 closed 10 months ago

zeeshanakram3 commented 1 year ago

Context

Discovered while working on https://github.com/Joystream/joystream/issues/4842

If the content Lead creates a video with an autoIssueNft parameter set, then the mappings would crash as mappings currently don't recognize Lead as a valid content actor. This issue is present in many other mappings such as OpenAuctionStarted, EnglishAuctionStarted, NFTIssued etc. because a common function (convertContentActorToChannelOrNftOwner) is used everywhere.

https://github.com/Joystream/joystream/blob/d1448236349154afa2c1a725f7144990c37d5042/query-node/mappings/src/content/utils.ts#L446

image

Fix

Gracefully handle actions by Lead as ContentActor