Skip to content

Commit

Permalink
Add ccToolsVersion to header
Browse files Browse the repository at this point in the history
  • Loading branch information
bandreghetti committed Jun 21, 2021
1 parent 34831c3 commit 537a85c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
3 changes: 1 addition & 2 deletions transactions/deleteAsset.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@ var DeleteAsset = Transaction{
return nil, errors.WrapError(err, "failed to read asset from blockchain")
}

response := make([]byte, 0)
var response []byte
if cascade {
response, err = asset.DeleteCascade(stub)
if err != nil {
return nil, errors.WrapError(err, "failed to delete asset recursively")
}
} else {

response, err = asset.Delete(stub)
if err != nil {
return nil, errors.WrapError(err, "failed to delete asset")
Expand Down
21 changes: 12 additions & 9 deletions transactions/getHeader.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ import (
)

type Header struct {
Name string
Version string
Colors map[string][]string
Title map[string]string
Name string
Version string
Colors map[string][]string
Title map[string]string
CCToolsVersion string
}

var header Header

func InitHeader(h Header) {
header = h
header.CCToolsVersion = "v0.7.0-rc.3"
}

// GetHeader returns data in CCHeader
Expand Down Expand Up @@ -52,11 +54,12 @@ var GetHeader = Transaction{
}

header := map[string]interface{}{
"name": header.Name,
"version": header.Version,
"orgMSP": orgMSP,
"colors": colors,
"orgTitle": orgTitle,
"name": header.Name,
"version": header.Version,
"orgMSP": orgMSP,
"colors": colors,
"orgTitle": orgTitle,
"ccToolsVersion": header.CCToolsVersion,
}
headerBytes, err := json.Marshal(header)
if err != nil {
Expand Down

0 comments on commit 537a85c

Please sign in to comment.