Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ';' delimiting support from ParseDecCoins #3951

Merged
merged 3 commits into from
Mar 25, 2019

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Mar 20, 2019

closes: #3915


  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry: sdkch add [section] [stanza] [message]

  • rereviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@alexanderbez alexanderbez marked this pull request as ready for review March 20, 2019 18:51
@alexanderbez alexanderbez requested review from alessio, jackzampolin, mossid and jaekwon and removed request for ebuchman March 20, 2019 18:51
@alexanderbez alexanderbez added the T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). label Mar 20, 2019
@codecov
Copy link

codecov bot commented Mar 20, 2019

Codecov Report

Merging #3951 into develop will decrease coverage by 0.02%.
The diff coverage is 61.11%.

@@             Coverage Diff             @@
##           develop    #3951      +/-   ##
===========================================
- Coverage    60.44%   60.42%   -0.03%     
===========================================
  Files          196      196              
  Lines        14488    14495       +7     
===========================================
+ Hits          8757     8758       +1     
- Misses        5150     5157       +7     
+ Partials       581      580       -1

types/dec_coin.go Outdated Show resolved Hide resolved
}

gasPricesStr := strings.Split(c.MinGasPrices, ";")
gasPrices := make(sdk.DecCoins, len(gasPricesStr))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? Wouldn't it be better to have a NewDecCoins(...) constructor kind of thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so.

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

It would be cool if we could share more logic between DecCoins and Coins, e.g. for parsing, but I don't know how to do it cleanly in Go. (any ideas?)

@alexanderbez
Copy link
Contributor Author

With regards to parsing, I think we can create a common function.

@alexanderbez alexanderbez merged commit dd7de2a into develop Mar 25, 2019
@alexanderbez alexanderbez deleted the bez/3915-fix-ParseDecCoins branch March 25, 2019 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ParseDecCoins shouldn't take a semicolon as delimiter
5 participants