mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
FAB-14444
Awaiting of wallet importing in fabcar Change-Id: Ib4a43f75850728794b90b58add7956de113cac80 Signed-off-by: NickLatkovich <nicklatkovich@gmail.com>
This commit is contained in:
parent
ed0f1cc9ea
commit
d63047cac9
4 changed files with 4 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue