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

migrate bank description #770

Merged
merged 2 commits into from
Sep 11, 2023
Merged

migrate bank description #770

merged 2 commits into from
Sep 11, 2023

Conversation

skyargos
Copy link
Contributor

Closes: #XXX
Related: #XXX

Description


For contributor use:

  • 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.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]"

metaData := baseKeeper.GetAllDenomMetaData(ctx)

for _, meta := range metaData {
if meta.Description == "The native staking token of the CertiK Chain." {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this condition?

Copy link
Contributor Author

@skyargos skyargos Sep 11, 2023

Choose a reason for hiding this comment

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

we can also remove the if directly and assign the value directly.
Because although it is an array at present, the length is only 1 and will not affect other

@skyargos skyargos marked this pull request as ready for review September 11, 2023 08:05
@skyargos skyargos requested a review from a team as a code owner September 11, 2023 08:05
if meta.Description == "The native staking token of the CertiK Chain." {
meta.Description = "The native staking token of the Shentu Chain."
}
baseKeeper.SetDenomMetaData(ctx, meta)
Copy link
Contributor

Choose a reason for hiding this comment

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

put this line in the if statement?

Copy link
Contributor Author

@skyargos skyargos Sep 11, 2023

Choose a reason for hiding this comment

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

we can also remove the if directly and assign the value directly.
Because although it is an array at present, the length is only 1 and will not affect other

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #770 (0a1c077) into master (56e2a20) will increase coverage by 0.02%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #770      +/-   ##
==========================================
+ Coverage   47.77%   47.80%   +0.02%     
==========================================
  Files         130      130              
  Lines       12705    12717      +12     
==========================================
+ Hits         6070     6079       +9     
- Misses       6044     6046       +2     
- Partials      591      592       +1     
Files Changed Coverage
app/upgrade_handler.go 75.00%

Copy link
Contributor

@0311xuyang 0311xuyang left a comment

Choose a reason for hiding this comment

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

LGTM

@0311xuyang 0311xuyang merged commit 0c7680b into master Sep 11, 2023
19 checks passed
@0311xuyang 0311xuyang deleted the bank-desc branch September 11, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants