Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions stores/flatten.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,5 +274,11 @@ func EncodeNonStrings(m map[string]interface{}) {
if vInt, ok := v.(int); ok {
m["shamir_threshold"] = fmt.Sprintf("%d", vInt)
}
// FlattenMetadata serializes the input as JSON and then deserializes it.
// The JSON unserializer treats every number as a float, so the above 'if'
// never applies in that situation.
if vFloat, ok := v.(float64); ok {
m["shamir_threshold"] = fmt.Sprintf("%g", vFloat)
}
}
}
Loading