use existing const instead of local string (#815)

Signed-off-by: Stefan Obermeier <st.obermeier@seeburger.de>

Signed-off-by: Stefan Obermeier <st.obermeier@seeburger.de>
This commit is contained in:
Stefan Obermeier 2022-08-19 21:50:56 +02:00 committed by GitHub
parent 1e8fd5cd56
commit cd4db0bc8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -811,7 +811,7 @@ func (s *SmartContract) Initialize(ctx contractapi.TransactionContextInterface,
if err != nil { if err != nil {
return false, fmt.Errorf("failed to get MSPID: %v", err) return false, fmt.Errorf("failed to get MSPID: %v", err)
} }
if clientMSPID != "Org1MSP" { if clientMSPID != minterMSPID {
return false, fmt.Errorf("client is not authorized to initialize contract") return false, fmt.Errorf("client is not authorized to initialize contract")
} }