Skip to content

Commit

Permalink
Fixed casing
Browse files Browse the repository at this point in the history
  • Loading branch information
thehenrytsai committed Sep 18, 2023
1 parent 9ad0964 commit 4bf4f58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/dwn-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export enum DwnErrorCode {
RecordsWriteGetEntryIdUndefinedAuthor = 'RecordsWriteGetEntryIdUndefinedAuthor',
RecordsWriteDataCidMismatch = 'RecordsWriteDataCidMismatch',
RecordsWriteDataSizeMismatch = 'RecordsWriteDataSizeMismatch',
RecordsWriteMissingauthorizationSigner = 'RecordsWriteMissingauthorizationSigner',
RecordsWriteMissingAuthorizationSigner = 'RecordsWriteMissingAuthorizationSigner',
RecordsWriteMissingDataInPrevious = 'RecordsWriteMissingDataInPrevious',
RecordsWriteMissingDataAssociation = 'RecordsWriteMissingDataAssociation',
RecordsWriteMissingDataStream = 'RecordsWriteMissingDataStream',
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/records-write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ export class RecordsWrite {
private _message: InternalRecordsWriteMessage;
/**
* Valid JSON message representing this RecordsWrite.
* @throws `DwnErrorCode.RecordsWriteMissingauthorizationSigner` if the message is not signed yet.
* @throws `DwnErrorCode.RecordsWriteMissingAuthorizationSigner` if the message is not signed yet.
*/
public get message(): RecordsWriteMessage {
if (this._message.authorization === undefined) {
throw new DwnError(
DwnErrorCode.RecordsWriteMissingauthorizationSigner,
DwnErrorCode.RecordsWriteMissingAuthorizationSigner,
'This RecordsWrite is not yet signed, JSON message cannot be generated from an incomplete state.'
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/interfaces/records-write.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ describe('RecordsWrite', () => {
expect(recordsWrite.author).to.not.exist;
expect(recordsWrite.authorizationPayload).to.not.exist;

expect(() => recordsWrite.message).to.throw(DwnErrorCode.RecordsWriteMissingauthorizationSigner);
expect(() => recordsWrite.message).to.throw(DwnErrorCode.RecordsWriteMissingAuthorizationSigner);
});
});
});

0 comments on commit 4bf4f58

Please sign in to comment.