Skip to content

Commit

Permalink
refactor(core): code formatting
Browse files Browse the repository at this point in the history
Signed-off-by: sanketshevkar <[email protected]>
Signed-off-by: sanket shevkar <[email protected]>
  • Loading branch information
sanketshevkar authored and jeromesimeon committed Aug 19, 2021
1 parent b89ce19 commit 861ef3c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cicero-core/src/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Template {
this.logicManager = new LogicManager('es6', null, options);
const templateKind = this.getMetadata().getTemplateType() !== 0 ? 'clause' : 'contract';
this.parserManager = new ParserManager(this.getModelManager(),null,templateKind);
this.authorSignature = authorSignature !== undefined ? authorSignature : null;
this.authorSignature = authorSignature ? authorSignature : null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/cicero-core/src/templatesaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TemplateSaver {
let zip = new JSZip();

//save the signature if present
if(template.authorSignature !== null){
if(template.authorSignature){
const templateSignatures = {
templateSignature: template.authorSignature
};
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions packages/cicero-core/test/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ describe('Template', () => {
fs.writeFileSync('./test/data/signing-template/unsignedArchive.cta', archiveBuffer);
const archivePath = path.join(__dirname,'data', 'signing-template', 'unsignedArchive.cta');
archivePath.should.be.a.file().and.not.empty;
fs.unlinkSync(archivePath);
});

it('should create the archive with signing it', async() => {
Expand All @@ -122,6 +123,7 @@ describe('Template', () => {
fs.writeFileSync('./test/data/signing-template/signedArchive.cta', archiveBuffer);
const archivePath = path.join(__dirname,'data', 'signing-template', 'signedArchive.cta');
archivePath.should.be.a.file().and.not.empty;
fs.unlinkSync(archivePath);
});

it('should throw an error if passphrase of the keystore is wrong', async() => {
Expand Down

0 comments on commit 861ef3c

Please sign in to comment.