Skip to content

Commit

Permalink
🐛 Fix AssetType list data writers
Browse files Browse the repository at this point in the history
  • Loading branch information
andremacedopv committed Jan 18, 2023
1 parent 61bc1a9 commit 6490664
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/assetListFuncs.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func StoreAssetList(stub *sw.StubWrapper) errors.ICCError {
"id": "primary",
})
if err != nil {
return errors.NewCCError("error gettin asset list key", http.StatusInternalServerError)
return errors.NewCCError("error getting asset list key", http.StatusInternalServerError)
}

exists, err := listKey.ExistsInLedger(stub)
Expand Down
3 changes: 3 additions & 0 deletions assets/dynamicAssetType.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ type DynamicAssetType struct {
// eg. []string{`$org\dMSP`} and cc-tools will
// check for a match with regular expression `org\dMSP`
AssetAdmins []string `json:"assetAdmins"`

// ? How to mix both?
AssetAdminsData []string `json:"assetAdminsData"`
}
4 changes: 2 additions & 2 deletions assets/dynamicAssetTypeConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ func GetListAssetType() AssetType {
Tag: "id",
Label: "ID",
DataType: "string",
Writers: dynamicAssetTypeConfig.AssetAdmins,
Writers: dynamicAssetTypeConfig.AssetAdminsData,
},
{
Required: true,
Tag: "list",
Label: "List",
DataType: "@object",
Writers: dynamicAssetTypeConfig.AssetAdmins,
Writers: dynamicAssetTypeConfig.AssetAdminsData,
}},
}
return AssetTypeListData
Expand Down

0 comments on commit 6490664

Please sign in to comment.