Skip to content

Commit

Permalink
FAB-14444
Browse files Browse the repository at this point in the history
Awaiting of wallet importing in fabcar

Change-Id: Ib4a43f75850728794b90b58add7956de113cac80
Signed-off-by: NickLatkovich <nicklatkovich@gmail.com>
  • Loading branch information
nicklatkovich committed Mar 1, 2019
1 parent ed0f1cc commit d63047c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fabcar/javascript/enrollAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function main() {
// Enroll the admin user, and import the new identity into the wallet.
const enrollment = await ca.enroll({ enrollmentID: 'admin', enrollmentSecret: 'adminpw' });
const identity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes());
wallet.import('admin', identity);
await wallet.import('admin', identity);
console.log('Successfully enrolled admin user "admin" and imported it into the wallet');

} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion fabcar/javascript/registerUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function main() {
const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity);
const enrollment = await ca.enroll({ enrollmentID: 'user1', enrollmentSecret: secret });
const userIdentity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes());
wallet.import('user1', userIdentity);
await wallet.import('user1', userIdentity);
console.log('Successfully registered and enrolled admin user "user1" and imported it into the wallet');

} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion fabcar/typescript/src/enrollAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function main() {
// Enroll the admin user, and import the new identity into the wallet.
const enrollment = await ca.enroll({ enrollmentID: 'admin', enrollmentSecret: 'adminpw' });
const identity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes());
wallet.import('admin', identity);
await wallet.import('admin', identity);
console.log('Successfully enrolled admin user "admin" and imported it into the wallet');

} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion fabcar/typescript/src/registerUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function main() {
const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity);
const enrollment = await ca.enroll({ enrollmentID: 'user1', enrollmentSecret: secret });
const userIdentity = X509WalletMixin.createIdentity('Org1MSP', enrollment.certificate, enrollment.key.toBytes());
wallet.import('user1', userIdentity);
await wallet.import('user1', userIdentity);
console.log('Successfully registered and enrolled admin user "user1" and imported it into the wallet');

} catch (error) {
Expand Down

0 comments on commit d63047c

Please sign in to comment.