diff --git a/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.spec.ts b/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.spec.ts index bd780153aa..367a9a94e8 100644 --- a/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.spec.ts +++ b/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.spec.ts @@ -942,7 +942,7 @@ describe('ConnectionProfileDataComponent', () => { mockConnectionProfileService.setHostname.should.be.called; mockNgbModal.open.should.have.been.called; - patchSpy.should.have.been.calledWith({cert: 'ordererCert_2', hostnameOverride: 'orderer0'}); + patchSpy.should.have.been.calledWith({cert: 'ordererCert_2', hostnameOverride: ''}); })); it('should open peers certificate modal if hostname set', fakeAsync(() => { @@ -1006,7 +1006,7 @@ describe('ConnectionProfileDataComponent', () => { mockConnectionProfileService.setHostname.should.be.called; mockNgbModal.open.should.have.been.called; - patchSpy.should.have.been.calledWith({cert: 'peerCert_1', hostnameOverride: 'peer0'}); + patchSpy.should.have.been.calledWith({cert: 'peerCert_1', hostnameOverride: ''}); })); it('should error on unrecognized type', fakeAsync(() => { diff --git a/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.ts b/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.ts index b1ad1fb6e5..6bb2c789fc 100644 --- a/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.ts +++ b/packages/composer-playground/src/app/connection-profile-data/connection-profile-data.component.ts @@ -531,17 +531,11 @@ export class ConnectionProfileDataComponent { return this.modalService.open(AddCertificateComponent).result .then((result) => { if (type === 'orderers') { - if (result.hostnameOverride === '') { - result.hostnameOverride = 'orderer' + index; - } this.v1Form.controls['orderers']['controls'][index].patchValue({ cert: result.cert, hostnameOverride: result.hostnameOverride }); } else if (type === 'peers') { - if (result.hostnameOverride === '') { - result.hostnameOverride = 'peer' + index; - } this.v1Form.controls['peers']['controls'][index].patchValue({ cert: result.cert, hostnameOverride: result.hostnameOverride