Skip to content
Merged
Changes from all commits
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: 3 additions & 3 deletions utils/cli_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (

func ParseUint64SliceFromString(s, separator string) ([]uint64, error) {
var parsedInts []uint64
for _, s := range strings.Split(s, separator) {
for s := range strings.SplitSeq(s, separator) {
s = strings.TrimSpace(s)

parsed, err := strconv.ParseUint(s, base, bitlen)
Expand All @@ -30,7 +30,7 @@ func ParseUint64SliceFromString(s, separator string) ([]uint64, error) {

func ParseSdkIntFromString(s, separator string) ([]math.Int, error) {
var parsedInts []math.Int
for _, weightStr := range strings.Split(s, separator) {
for weightStr := range strings.SplitSeq(s, separator) {
weightStr = strings.TrimSpace(weightStr)

parsed, err := strconv.ParseUint(weightStr, base, bitlen)
Expand All @@ -44,7 +44,7 @@ func ParseSdkIntFromString(s, separator string) ([]math.Int, error) {

func ParseSdkDecFromString(s, separator string) ([]math.LegacyDec, error) {
var parsedDec []math.LegacyDec
for _, weightStr := range strings.Split(s, separator) {
for weightStr := range strings.SplitSeq(s, separator) {
weightStr = strings.TrimSpace(weightStr)

parsed, err := math.LegacyNewDecFromStr(weightStr)
Expand Down
Loading