Skip to content

Commit

Permalink
Remove root param from putRecursive
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaellafs committed Oct 27, 2023
1 parent d04e2d6 commit 4e9bc60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (a *Asset) PutNew(stub *sw.StubWrapper) (map[string]interface{}, errors.ICC
return res, nil
}

func putRecursive(stub *sw.StubWrapper, object map[string]interface{}, root bool) (map[string]interface{}, errors.ICCError) {
func putRecursive(stub *sw.StubWrapper, object map[string]interface{}) (map[string]interface{}, errors.ICCError) {
var err error

objAsKey, err := NewKey(object)
Expand Down Expand Up @@ -181,7 +181,7 @@ func putRecursive(stub *sw.StubWrapper, object map[string]interface{}, root bool
return nil, errors.NewCCError(fmt.Sprintf("asset reference property '%s' must have an '@assetType' property", subAsset.Tag), 400)
}
}
putSubAsset, err := putRecursive(stub, obj, false)
putSubAsset, err := putRecursive(stub, obj)
if err != nil {
return nil, errors.WrapError(err, fmt.Sprintf("failed to put sub-asset %s recursively", subAsset.Tag))
}
Expand Down Expand Up @@ -218,7 +218,7 @@ func putRecursive(stub *sw.StubWrapper, object map[string]interface{}, root bool
// PutRecursive inserts asset and all its subassets in blockchain.
// This method is experimental and might not work as intended. Use with caution.
func PutRecursive(stub *sw.StubWrapper, object map[string]interface{}) (map[string]interface{}, errors.ICCError) {
return putRecursive(stub, object, true)
return putRecursive(stub, object)
}

// PutNewRecursive inserts asset and all its subassets in blockchain
Expand Down

0 comments on commit 4e9bc60

Please sign in to comment.