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

chore: 7th kadai #341

Merged
merged 2 commits into from
Feb 5, 2025
Merged

chore: 7th kadai #341

merged 2 commits into from
Feb 5, 2025

Conversation

ylv-io
Copy link
Collaborator

@ylv-io ylv-io commented Feb 5, 2025

Description

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Deployment
  • Forge Script
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests have 100% code coverage
  • The base branch is either main, or there's a description of how to merge

Issue Resolution

Copy link

github-actions bot commented Feb 5, 2025

Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary

unchecked-transfer

Impact: High
Confidence: Medium

function withdraw(address asset, uint256 amount) public returns (uint256) {
address pool = poolAddressProvider.getPool();
// If amount is max uint256, withdraw all available
if (amount == type(uint256).max) {
amount = IERC20(IAavePool(pool).getReserveData(asset).aTokenAddress).balanceOf(address(this));
}
// Withdraw from Aave
IAavePool(pool).withdraw(asset, amount, address(this));
// Send the fee to the Safe
uint256 fee = amount * FEE / 1e18;
IERC20(asset).transfer(safe, fee);
return amount - fee;
}

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.83%. Comparing base (9ddbc8c) to head (ee1ee10).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #341   +/-   ##
=======================================
  Coverage   88.83%   88.83%           
=======================================
  Files          41       41           
  Lines        2579     2579           
=======================================
  Hits         2291     2291           
  Misses        288      288           

@VSBDev VSBDev self-requested a review February 5, 2025 20:34
@VSBDev VSBDev merged commit d1e5236 into main Feb 5, 2025
8 checks passed
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