mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
balance transfer: fix register response error
Response empty secret value after successfully register and enroll, and the value of "enrollmentSecret" in persistence is also empty string. The fix allow user get the enrollment secret value. Signed-off-by: zhayujie <yjzha1996@163.com>
This commit is contained in:
parent
1252c7a0ee
commit
a9f584a5eb
1 changed files with 2 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ var getRegisteredUser = async function(username, userOrg, isJson) {
|
|||
}, adminUserObj);
|
||||
logger.debug('Successfully got the secret for user %s',username);
|
||||
user = await client.setUserContext({username:username, password:secret});
|
||||
user._enrollmentSecret = secret;
|
||||
await client.setUserContext(user);
|
||||
logger.debug('Successfully enrolled username %s and setUserContext on the client object', username);
|
||||
}
|
||||
if(user && user.isEnrolled) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue