Skip to content

Commit

Permalink
modify transfer by sendValue
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhouzlane committed Mar 1, 2024
1 parent 18a1f0f commit b39b527
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/contracts/governance/DAOSpokeContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/Timers.sol';
import '@openzeppelin/contracts/utils/Checkpoints.sol';
import '@openzeppelin/contracts/governance/utils/IVotes.sol';
import '@openzeppelin/contracts/utils/Address.sol';

import './MetaHumanGovernor.sol';
import './wormhole/IWormholeRelayer.sol';
import './wormhole/IWormholeReceiver.sol';
Expand All @@ -15,6 +17,7 @@ import './magistrate/Magistrate.sol';
* It integrates with the MetaHumanGovernor contract for governance operations.
*/
contract DAOSpokeContract is IWormholeReceiver, Magistrate {
using Address for address payable;
bytes32 public immutable hubContractAddress;
uint16 public immutable hubContractChainId;
IVotes public immutable token;
Expand Down Expand Up @@ -87,7 +90,7 @@ contract DAOSpokeContract is IWormholeReceiver, Magistrate {
* @dev Allows the magistrate address to withdraw all funds from the contract
*/
function withdrawFunds() public onlyMagistrate {
payable(msg.sender).transfer(address(this).balance);
payable(msg.sender).sendValue(address(this).balance);
}

function hasVoted(
Expand Down

0 comments on commit b39b527

Please sign in to comment.