-
Notifications
You must be signed in to change notification settings - Fork 27
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
Move duplicated getIssueFee
& getMintFee
helpers to CoreumChain
in integr-tests
#581
Conversation
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.
Reviewable status: 0 of 9 files reviewed, 1 unresolved discussion (waiting on @miladz68, @vertex451, @wojtek-coreum, and @ysv)
integration-tests/coreum.go
line 186 at r1 (raw file):
// QueryAssetFTParams queries for asset/ft module params and returns them. func (c CoreumChain) QueryAssetFTParams(ctx context.Context, t *testing.T) assetfttypes.Params { queryClient := assetfttypes.NewQueryClient(c.ClientContext)
You need to add t.Testing() for that func and text func, if you pass the t *testing.T as arg. This is good practice since helps the testing framework separate test and helper functions and in case of logs or errors, show proper line in the test.
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.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @vertex451, @wojtek-coreum, and @ysv)
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.
Reviewable status: 8 of 9 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @miladz68, @vertex451, and @wojtek-coreum)
integration-tests/coreum.go
line 186 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
You need to add t.Testing() for that func and text func, if you pass the t *testing.T as arg. This is good practice since helps the testing framework separate test and helper functions and in case of logs or errors, show proper line in the test.
I guess you meant to add t.Helper()
Done
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.
Reviewable status: 8 of 9 files reviewed, 1 unresolved discussion (waiting on @miladz68, @vertex451, @wojtek-coreum, and @ysv)
integration-tests/coreum.go
line 186 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
I guess you meant to add
t.Helper()
Done
Right.
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.
Reviewable status: 8 of 9 files reviewed, all discussions resolved (waiting on @miladz68, @vertex451, and @wojtek-coreum)
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @vertex451 and @wojtek-coreum)
Description
This PR replaces duplicated
getIssueFee
helper func in multiple locations with a singleQueryAssetFTParams
method insideCoreumChain
struct.Same refactoring applied to asset/nft params to avoid same issue in the future.
The idea is to avoid code duplication & have a single universal method to query all params for asset/ft & asset/nft modules.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)