Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions escrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ contract Escrow {
require(msg.value > 0, "Must deposit a positive amount.");

// Deposit the funds into the escrow contract
escrow.transfer(msg.value);
payable(escrow).transfer(msg.value);
}

// Function to release the funds from escrow
function releaseFunds() public {
require(fundsLocked, "Funds are not locked in escrow.");

// Transfer the funds to the caller
msg.sender.transfer(this.balance);
payable(msg.sender).transfer(address(this).balance);

// Set the fundsLocked flag to false
fundsLocked = false;
Expand Down