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

fix(x/cwerrors): send fees from the sender account instead of contract account #562

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Contains all the PRs that improved the code without changing the behaviors.
- [#539](https://github.com/archway-network/archway/pull/539) - Remediations for x/callback audit
- [#552](https://github.com/archway-network/archway/pull/552) - Fix issue with x/callback callback error code was not identified correctly when setting cwerrors
- [#559](https://github.com/archway-network/archway/pull/559) - Fixing wrong bond denom being considered for x/callback and x/cwerrors fees
- [#562](https://github.com/archway-network/archway/pull/562) - Fixing the account from which x/cwerrors subscription fees are deducted


## [v6.0.0](https://github.com/archway-network/archway/releases/tag/v6.0.0)
Expand Down
2 changes: 1 addition & 1 deletion x/cwerrors/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *KeeperTestSuite) TestSubscribeToError() {
testCase: "FAIL: account doesnt have enough balance",
input: func() *types.MsgSubscribeToError {
return &types.MsgSubscribeToError{
Sender: contractAdminAcc.Address.String(),
Sender: contractAddr.String(),
ContractAddress: contractAddr.String(),
Fee: sdk.NewInt64Coin(sdk.DefaultBondDenom, 101),
}
Expand Down
2 changes: 1 addition & 1 deletion x/cwerrors/keeper/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (k Keeper) SetSubscription(ctx sdk.Context, sender, contractAddress sdk.Acc
if fee.IsLT(params.SubscriptionFee) {
return -1, types.ErrInsufficientSubscriptionFee
}
err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, contractAddress, authtypes.FeeCollectorName, sdk.NewCoins(fee))
err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, authtypes.FeeCollectorName, sdk.NewCoins(fee))
if err != nil {
return -1, err
}
Expand Down
Loading