Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Diane Huxley committed Oct 6, 2023
1 parent 889cb56 commit 6f4d0d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/api/src/dwn-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ export class DwnApi {
const protocols = entries.map((entry: ProtocolsQueryReplyEntry) => {
const metadata = { author: this.connectedDid, };

return new Protocol(this.agent, entry, metadata);
// FIXME: dwn-sdk-js actually returns the entire ProtocolsConfigure message,
// but the type claims that it returns the message without authorization.
// When dwn-sdk-js fixes the type, we should remove `as ProtocolsConfigureMessage`
return new Protocol(this.agent, entry as ProtocolsConfigureMessage, metadata);
});

return { protocols, status };
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type RecordOptions = RecordsWriteMessage & {
};

export type RecordModel = RecordsWriteDescriptor
& Omit<RecordsWriteMessage, 'descriptor' | 'recordId'>
& Omit<RecordsWriteMessage, 'descriptor' | 'recordId' | 'authorization'>
& {
author: string;
recordId?: string;
Expand Down

0 comments on commit 6f4d0d7

Please sign in to comment.