Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Jul 15, 2024
1 parent f33944e commit d2de62e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/coins/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ func FormatCoins(coins []*basev1beta1.Coin, metadata []*bankv1beta1.Metadata) (s
if err != nil {
return "", err
}
// If a coin contains a comma, return an error given that the output
// could be misinterpreted by the user as 2 different coins.
if strings.Contains(formatted[i], ",") {
return "", fmt.Errorf("coin %s contains a comma", formatted[i])
}
}

if len(coins) == 0 {
Expand Down

0 comments on commit d2de62e

Please sign in to comment.