Skip to content

Commit

Permalink
Switch Identities (hyperledger-archives#840)
Browse files Browse the repository at this point in the history
When you select a new connection profile you are asked which identity you want to use

contributes to hyperledger/composer#741
  • Loading branch information
cazfletch authored May 4, 2017
1 parent 911ce00 commit a897d86
Show file tree
Hide file tree
Showing 32 changed files with 1,036 additions and 767 deletions.
8 changes: 4 additions & 4 deletions packages/composer-playground/.istanbul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ instrumentation:
- "docker/*"
check:
global:
statements: 68
branches: 57
functions: 55
lines: 67
statements: 78
branches: 69
functions: 66
lines: 78
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add-identity-modal {
p {
color: $secondary-text;
}

footer {
.circle-path {
stroke: $white;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AddIdentityComponent {

let connectionProfile = this.connectionProfileService.getCurrentConnectionProfile();
let wallet = this.walletService.getWallet(connectionProfile);

return wallet.contains(this.userID)
.then((contains) => {
if (contains) {
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-playground/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {AlertService} from './services/alert.service';
import {ConnectionProfileService} from './services/connectionprofile.service';
import {WalletService} from './services/wallet.service';
import {IdentityService} from './services/identity.service';
import {InitializationService} from './initialization.service';
import {InitializationService} from './services/initialization.service';
import {BusyComponent} from './busy';
import {ErrorComponent} from './error';
import {ResetComponent} from './reset';
Expand Down
7 changes: 5 additions & 2 deletions packages/composer-playground/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {RegistryComponent} from './registry';
import {AddIdentityComponent} from './add-identity';
import {IssueIdentityComponent} from './issue-identity';
import {IdentityIssuedComponent} from './identity-issued';
import {SwitchIdentityComponent} from './switch-identity';
import {AboutComponent} from './about';
import {BusyComponent} from './busy';
import {ErrorComponent} from './error';
Expand Down Expand Up @@ -58,7 +59,7 @@ import { ClientService } from './services/client.service';
import { ConnectionProfileService } from './services/connectionprofile.service';
import { WalletService } from './services/wallet.service';
import { IdentityService } from './services/identity.service';
import { InitializationService } from './initialization.service';
import { InitializationService } from './services/initialization.service';
import { SampleBusinessNetworkService } from './services/samplebusinessnetwork.service';
import { AboutService } from './services/about.service';
import { AlertService } from './services/alert.service';
Expand Down Expand Up @@ -109,7 +110,8 @@ type StoreType = {
WelcomeComponent,
VersionCheckComponent,
ResetComponent,
BusyComponent
BusyComponent,
SwitchIdentityComponent
],
declarations: [
AppComponent,
Expand All @@ -121,6 +123,7 @@ type StoreType = {
AddIdentityComponent,
IssueIdentityComponent,
IdentityIssuedComponent,
SwitchIdentityComponent,
BusyComponent,
ErrorComponent,
SuccessComponent,
Expand Down
Loading

0 comments on commit a897d86

Please sign in to comment.