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(MToken): handle allowance in burn #190

Merged
merged 4 commits into from
Aug 29, 2024
Merged

Conversation

PierrickGT
Copy link
Member

No description provided.

Copy link

github-actions bot commented Aug 28, 2024

LCOV of commit ed31631 during Forge Coverage #588

Summary coverage rate:
  lines......: 96.7% (116 of 120 lines)
  functions..: 93.2% (41 of 44 functions)
  branches...: 90.9% (20 of 22 branches)

Files changed coverage rate:
                                     |Lines       |Functions  |Branches    
  Filename                           |Rate     Num|Rate    Num|Rate     Num
  =========================================================================
  src/MToken.sol                     |97.9%     96|96.4%    28| 100%     20

src/MToken.sol Outdated Show resolved Hide resolved
src/MToken.sol Outdated
@@ -78,6 +79,17 @@ contract MToken is IMToken, ContinuousIndexing, ERC20Extended {

/// @inheritdoc IMToken
function burn(address account_, uint256 amount_) external onlyPortal {
uint256 spenderAllowance_ = allowance[account_][msg.sender];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
uint256 spenderAllowance_ = allowance[account_][msg.sender];
uint256 portalAllowance_ = allowance[account_][portal];

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in this commit: ed31631

@PierrickGT PierrickGT requested a review from toninorair August 29, 2024 15:37
Copy link
Collaborator

@toninorair toninorair left a comment

Choose a reason for hiding this comment

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

lgtm

@PierrickGT PierrickGT merged commit eb451c8 into spoke Aug 29, 2024
2 checks passed
@PierrickGT PierrickGT deleted the fix/burn-from-allowance branch August 29, 2024 21:58
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.

2 participants