Skip to content

fix: preventing user from setting contract flat fee if rewards address is not set #414

Merged
spoo-bar merged 4 commits into
mainfrom
spoorthi/fix-set-flat-fee-
Jul 4, 2023
Merged

fix: preventing user from setting contract flat fee if rewards address is not set #414
spoo-bar merged 4 commits into
mainfrom
spoorthi/fix-set-flat-fee-

Conversation

@spoo-bar

@spoo-bar spoo-bar commented Jul 4, 2023

Copy link
Copy Markdown
Contributor

If rewards address is not set, prevent the contract owner from setting contract flat fee.
(Removing of flat fee is still allowed)

This is to prevent ante handler from panic-ing as it tries to create a rewards record in min_cons_fee ante handler

@codecov

codecov Bot commented Jul 4, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.06 🎉

Comparison is base (edff565) 69.33% compared to head (8be7679) 69.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #414      +/-   ##
==========================================
+ Coverage   69.33%   69.39%   +0.06%     
==========================================
  Files          67       67              
  Lines        3979     3977       -2     
==========================================
+ Hits         2759     2760       +1     
+ Misses       1124     1122       -2     
+ Partials       96       95       -1     
Impacted Files Coverage Δ
x/rewards/ante/min_cons_fee.go 91.17% <100.00%> (+6.96%) ⬆️
x/rewards/keeper/flat_fee.go 77.77% <100.00%> (+1.30%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@spoo-bar spoo-bar marked this pull request as ready for review July 4, 2023 12:53
@spoo-bar spoo-bar requested review from a team and fdymylja July 4, 2023 12:53

@fdymylja fdymylja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@zanicar zanicar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@spoo-bar spoo-bar merged commit ae13d23 into main Jul 4, 2023
@spoo-bar spoo-bar deleted the spoorthi/fix-set-flat-fee- branch July 4, 2023 13:05
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.

3 participants