preprod version
This commit is contained in:
parent
60b5414944
commit
f3b00deecb
12
monnethic.go
12
monnethic.go
|
@ -148,9 +148,9 @@ func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
|
|||
} else if function == "getHistoryForWallet" {
|
||||
// make a transaction of X units from a wallet to an other
|
||||
return t.getHistoryForWallet(stub, args)
|
||||
} else if function == "getAllWallets" {
|
||||
// get All Wallets
|
||||
return t.getAllWallets(stub, args)
|
||||
} else if function == "getAllEntities" {
|
||||
// get All Entities of the present ledger
|
||||
return t.getAllEntities(stub, args)
|
||||
}
|
||||
|
||||
return shim.Error("Invalid invoke function name. Expecting \"invoke\" \"delete\" \"query\" \"register\"")
|
||||
|
@ -850,7 +850,7 @@ func (t *SimpleChaincode) queryWalletsByOwner(stub shim.ChaincodeStubInterface,
|
|||
return shim.Error("Incorrect number of arguments. Expecting 1")
|
||||
}
|
||||
|
||||
owner := strings.ToLower(args[0])
|
||||
owner := args[0]
|
||||
|
||||
queryString := fmt.Sprintf("{\"selector\":{\"docType\":\"wallet\",\"owner\":\"%s\"}}", owner)
|
||||
|
||||
|
@ -982,7 +982,7 @@ func (t *SimpleChaincode) getHistoryForWallet(stub shim.ChaincodeStubInterface,
|
|||
}
|
||||
|
||||
|
||||
func (t *SimpleChaincode) getAllWallets(stub shim.ChaincodeStubInterface, args []string) pb.Response {
|
||||
func (t *SimpleChaincode) getAllEntities(stub shim.ChaincodeStubInterface, args []string) pb.Response {
|
||||
|
||||
if len(args) < 2 {
|
||||
return shim.Error("Incorrect number of arguments. Expecting 2")
|
||||
|
@ -1002,7 +1002,7 @@ func (t *SimpleChaincode) getAllWallets(stub shim.ChaincodeStubInterface, args [
|
|||
return shim.Error(err.Error())
|
||||
}
|
||||
|
||||
fmt.Printf("- getAllWallets queryResult:\n%s\n", buffer.String())
|
||||
fmt.Printf("- getAllEntities queryResult:\n%s\n", buffer.String())
|
||||
|
||||
return shim.Success(buffer.Bytes())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue