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

Feat : Trimmed label to prevent white spaces #1412

Merged
merged 6 commits into from
May 26, 2023

Conversation

ruthishvitwit
Copy link
Contributor

closes #1183

The aim of this pr is to prevent white spaces in labels by either silent trimming before storing or to fail when the label is not trimmed

@ruthishvitwit ruthishvitwit requested a review from alpe as a code owner May 19, 2023 05:56
Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Good start!
I added some comments to polish the code. Please add test cases for regression. You can find existing ones in proposal_test.go and tx_test.go

x/wasm/types/proposal.go Outdated Show resolved Hide resolved
x/wasm/types/proposal.go Outdated Show resolved Hide resolved
x/wasm/types/validation.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #1412 (dd70f6d) into main (f3f69a6) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1412      +/-   ##
==========================================
+ Coverage   60.14%   60.15%   +0.01%     
==========================================
  Files          60       60              
  Lines        7557     7559       +2     
==========================================
+ Hits         4545     4547       +2     
  Misses       2676     2676              
  Partials      336      336              
Impacted Files Coverage Δ
x/wasm/types/validation.go 94.11% <100.00%> (+0.36%) ⬆️

@ruthishvitwit ruthishvitwit requested a review from alpe May 23, 2023 06:29
@alpe alpe added this to the v0.41.0 milestone May 24, 2023
Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

LGTM 💐 Thanks for the help!

@alpe alpe merged commit e563a10 into CosmWasm:main May 26, 2023
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.

Trim label to prevent whitespaces
2 participants