Skip to content

Commit

Permalink
doc: clean up docs and include extraFields and Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
teezzan committed May 28, 2024
1 parent 82ae000 commit b446757
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/message/__tests__/store/publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ describe('Store message publish', () => {
const extraFields: Record<string, unknown> = {
key1: 'value1',
key2: 123,
};
}

const hash = await store.send({
channel: 'TEST',
account: account,
fileObject: fileContent,
extraFields
extraFields,
})

const response = await store.download(hash.content.item_hash)
Expand All @@ -31,7 +31,7 @@ describe('Store message publish', () => {
const expected = 'y'

expect(got).toBe(expected)
expect(hash.content.extra_fields).toEqual(extraFields);
expect(hash.content.extra_fields).toEqual(extraFields)
})

it('should pin a file and retrieve it correctly', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/message/src/store/impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class StoreMessageClient {
item_type: storageEngine,
item_hash: hash,
time: timestamp,
extra_fields: extraFields
extra_fields: extraFields,
}

const builtMessage = buildStoreMessage({
Expand Down
2 changes: 1 addition & 1 deletion packages/message/src/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type StorePinConfiguration = {
*
* inlineRequested: If set to False, the Store message will be store on the same storageEngine you picked.
*
* apiServer: The API server endpoint used to carry the request to the Aleph's network.
* extraFields: Extra fields to add to the Store message.
*
* sync: If true, the function will wait for the message to be confirmed by the API server.
*/
Expand Down

0 comments on commit b446757

Please sign in to comment.