-
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
Refactor MultiSend interceptor to work only with 1 input #660
Refactor MultiSend interceptor to work only with 1 input #660
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.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @dzmitryhil 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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @miladz68 and @wojtek-coreum)
a discussion (no related file):
Check the tests please they are failed
x/asset/ft/keeper/before_send.go
line 86 at r1 (raw file):
burnAmount := k.ApplyRate(ctx, def.BurnRate, issuer, sender, outOps) if err := k.burnIfSpendable(ctx, sender, def, burnAmount); err != nil {
You burn twice. Why does the unit tests don't show it?
x/asset/ft/keeper/before_send.go
line 100 at r1 (raw file):
} if err := k.isCoinSpendable(ctx, sender, def, coin.Amount); err != nil {
Does it make send to check it before burning and commision?
x/asset/ft/keeper/before_send.go
line 104 at r1 (raw file):
} return iterateMapDeterministic(outOps, func(account string, amount sdkmath.Int) error {
The same quesion here, does it make send to check it before burning and commision?
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 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @miladz68 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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @dzmitryhil and @wojtek-coreum)
a discussion (no related file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Check the tests please they are failed
Done.
x/asset/ft/keeper/before_send.go
line 86 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
You burn twice. Why does the unit tests don't show it?
well they actually show it. integration and unit tests are failing.
removed.
x/asset/ft/keeper/before_send.go
line 100 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Does it make send to check it before burning and commision?
no, because if want to make sure the sender has enough balance after the rates are applied.
x/asset/ft/keeper/before_send.go
line 104 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
The same quesion here, does it make send to check it before burning and commision?
Right now we are not modifying the received amount, but any of our features in future might touch it. for the same reason stated above. it makes sense to perform the checks at the end of function.
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: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @miladz68, @wojtek-coreum, and @ysv)
x/asset/ft/keeper/before_send.go
line 86 at r1 (raw file):
Previously, miladz68 (milad) wrote…
well they actually show it. integration and unit tests are failing.
removed.
But unit tests should show it as well. Add the test case to the unit tests please.
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: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @wojtek-coreum, and @ysv)
x/asset/ft/keeper/before_send.go
line 86 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
But unit tests should show it as well. Add the test case to the unit tests please.
the unit tests did show it before i fixed them. perhaps you refer to one unit test that tested the rate caculations ? that test is not supposed to show the problem since it only concerns the calculation of the rates not their applicaiton.
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: 1 of 3 files reviewed, all discussions resolved (waiting on @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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @wojtek-coreum)
Description
With a change introduced to bank Multisend in Cosmos SDK v0.47, only a single sender can be specified in Multisend. In this PR we take advantage of this change to make the logic of our interceptor much simpler.
Reviewers checklist:
Authors checklist
This change is