Browse Source

pioneer media: add member id to add_content() tx

Mokhtar Naamani 4 years ago
parent
commit
9c008fdd08
1 changed files with 3 additions and 2 deletions
  1. 3 2
      pioneer/packages/joy-media/src/Upload.tsx

+ 3 - 2
pioneer/packages/joy-media/src/Upload.tsx

@@ -24,6 +24,7 @@ import { EditVideoView } from './upload/EditVideo.view';
 import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';
 import { IterableFile } from './IterableFile';
 import { StorageProviderId } from '@joystream/types/working-group';
+import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
 
 const MAX_FILE_SIZE_MB = 500;
 const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
@@ -248,8 +249,8 @@ class Component extends React.PureComponent<Props, State> {
 
     // TODO get corresponding data type id based on file content
     const dataObjectTypeId = new BN(1);
-
-    return [newContentId, dataObjectTypeId, new BN(file.size), ipfs_cid];
+    const { myMemberId } = useMyMembership();
+    return [newContentId, myMemberId, dataObjectTypeId, new BN(file.size), ipfs_cid];
   }
 
   private onDataObjectCreated = async (_txResult: SubmittableResult) => {