Skip to content

Commit

Permalink
Update weight formatting in composed.go
Browse files Browse the repository at this point in the history
Changed weight string format from three to eighteen decimal places for consistency with expected precision. This ensures compliance with the required 18 decimal places format for weights in the composed stream setup.
  • Loading branch information
outerlook committed Sep 24, 2024
1 parent a079d7a commit d922c0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/contracts/tests/utils/setup/composed.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func setTaxonomy(ctx context.Context, input SetTaxonomyInput) error {
primitiveStreamStrings = append(primitiveStreamStrings, item.ChildStream.StreamId.String())
dataProviderStrings = append(dataProviderStrings, item.ChildStream.DataProvider.Address())
// should be formatted as 0.000000000000000000 (18 decimal places)
weightStrings = append(weightStrings, fmt.Sprintf("%.3f", item.Weight))
weightStrings = append(weightStrings, fmt.Sprintf("%.18f", item.Weight))
}

dbid := utils.GenerateDBID(input.composedStream.StreamId.String(), input.Platform.Deployer)
Expand Down

0 comments on commit d922c0d

Please sign in to comment.