-
Notifications
You must be signed in to change notification settings - Fork 841
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
[ENG-219] bump erc20 test coverage #546
Conversation
x/erc20/keeper/proposals.go
Outdated
@@ -58,6 +58,7 @@ func (k Keeper) RegisterCoin(ctx sdk.Context, coinMetadata banktypes.Metadata) ( | |||
|
|||
// verify if the metadata matches the existing one, if not it sets it to the store | |||
func (k Keeper) verifyMetadata(ctx sdk.Context, coinMetadata banktypes.Metadata) error { | |||
// Metadata cant be invalid since its checked that bank supply is available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this comment, can you rephrase it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment was wrong.
Deleted the comment and added coinMetadata.Validate()
check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the metadata validated already in the proposal types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thats correct. Ill delete this check since its unnecessary
Codecov Report
@@ Coverage Diff @@
## main #546 +/- ##
==========================================
+ Coverage 81.57% 83.18% +1.60%
==========================================
Files 115 115
Lines 6318 6334 +16
==========================================
+ Hits 5154 5269 +115
+ Misses 1009 936 -73
+ Partials 155 129 -26
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 👌
* loredana/ENG-214-add-epoch-types: (40 commits) Update evmos v3 -> v4 after latest changes Add year and hour epochs Update evmos v3 -> v4 after latest changes uncomment check feat: Inbound / outbound peers & default seeds (evmos#541) upgrade: Update Evmos go.mod version `v3` -> `v4` (evmos#557) Add change log Add migration logic for epoch change Fix epochs unit tests Revert to ascending order Store epoch information by duration and by identifier audit(erc20): add types tests and update comments (evmos#550) [ENG-219] bump erc20 test coverage (evmos#546) audit(erc20): state machine audit (evmos#547) audit(erc20): Changes from api audit (evmos#544) imp: update default min-gas-prices (evmos#543) imp: use constants for epochs IDs (evmos#539) fix: upgrade client router key (evmos#537) impr(`inflation`): Rename total supply endpoint (evmos#536) fix: `buf protoc` was moved to `buf alpha protoc` (evmos#462) ...
Description
Add test coverage for the erc20 module
Closes: #XXX
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
PR review checkboxes:
I have...
Unreleased
section inCHANGELOG.md
Code maintenance:
I have...
godoc
and code comments.docs/
) or specification (x/<module>/spec/
)Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.
I have...