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

MCPayment: add erc 20 withdraw #338

Merged
merged 6 commits into from
Jan 31, 2025

Conversation

volodymyr-basiuk
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jan 30, 2025

Pull Request Test Coverage Report for Build 13058217719

Details

  • 11 of 14 (78.57%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 83.918%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/payment/MCPayment.sol 11 14 78.57%
Totals Coverage Status
Change from base Build 12891717959: -0.1%
Covered Lines: 1022
Relevant Lines: 1142

💛 - Coveralls

vmidyllic
vmidyllic previously approved these changes Jan 30, 2025
Kolezhniuk
Kolezhniuk previously approved these changes Jan 30, 2025
daveroga
daveroga previously approved these changes Jan 30, 2025
function ownerERC20Withdraw(address token) public onlyOwner {
uint amount = IERC20(token).balanceOf(address(this));
if (amount == 0) {
revert WithdrawError("There is no balance to withdraw");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would avoid adding strings as custom error params. It may cost more gas. Better change the error name

@volodymyr-basiuk volodymyr-basiuk merged commit 775bb41 into master Jan 31, 2025
5 checks passed
@volodymyr-basiuk volodymyr-basiuk deleted the feat/mc-payment-erc-20-withdraw branch January 31, 2025 13:17
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.

6 participants