fabric-contract-api
Advanced tools
Comparing version 1.4.0-snapshot.45 to 1.4.0-snapshot.46
@@ -28,6 +28,6 @@ /* | ||
this.__isContract = true; | ||
if (typeof name === 'undefined' || name === null) { | ||
this.name = this.constructor.name; | ||
if (name && name.trim() !== '') { | ||
this.name = name.trim(); | ||
} else { | ||
this.name = name.trim(); | ||
this.name = ''; | ||
} | ||
@@ -34,0 +34,0 @@ } |
{ | ||
"name": "fabric-contract-api", | ||
"version": "1.4.0-snapshot.45", | ||
"version": "1.4.0-snapshot.46", | ||
"tag": "unstable", | ||
@@ -5,0 +5,0 @@ "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", |
@@ -64,12 +64,4 @@ /* | ||
class SCBeta extends Contract { | ||
/** */ | ||
constructor() { | ||
super(); | ||
} | ||
} | ||
describe('contract.js', () => { | ||
@@ -91,3 +83,3 @@ | ||
const sc0 = new Contract(); | ||
expect(sc0.getName()).to.equal('Contract'); | ||
expect(sc0.getName()).to.equal(''); | ||
@@ -123,6 +115,2 @@ // should also create default when the supplied name is empty space | ||
expect(sc2.getName()).to.equal('somewhat.padded.out'); | ||
const sc3 = new SCBeta(); | ||
expect(sc3.name).to.equal('SCBeta'); | ||
expect(sc3.getName()).to.equal('SCBeta'); | ||
}); | ||
@@ -129,0 +117,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82865
2092