Skip to content

fix: check return value from transfer funds#1351

Merged
karlem merged 4 commits intomainfrom
check-for-transfers
May 28, 2025
Merged

fix: check return value from transfer funds#1351
karlem merged 4 commits intomainfrom
check-for-transfers

Conversation

@karlem
Copy link
Copy Markdown
Contributor

@karlem karlem commented May 28, 2025

Check the return value of the fund transfer. If it fails, the call should revert.

@karlem karlem requested a review from a team as a code owner May 28, 2025 12:25
@karlem karlem force-pushed the check-for-transfers branch from 57c81e1 to 90371f3 Compare May 28, 2025 12:30

s.subnetKeys.remove(id);
SubnetActorGetterFacet(msg.sender).collateralSource().transferFunds(payable(msg.sender), stake);
(bool success, ) = SubnetActorGetterFacet(msg.sender).collateralSource().transferFunds(
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.

can add a safe transfer method for Asset to avoid duplicated success check.

@karlem karlem merged commit a01f507 into main May 28, 2025
16 checks passed
@karlem karlem deleted the check-for-transfers branch May 28, 2025 14: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.

3 participants