Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/Treasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ contract Treasury is Initializable, UUPSUpgradeable, OwnableUpgradeable {
(bool success,) = request.to.call{value: request.amount}("");
if (!success) revert TransferFailed();
} else {
IERC20(request.token).transfer(request.to, request.amount);
bool success = IERC20(request.token).transfer(request.to, request.amount);
if (!success) revert TransferFailed();
}

emit WithdrawalExecuted(requestId);
Expand Down
10 changes: 6 additions & 4 deletions src/escrow/SafeBaseEscrowV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ contract SafeBaseEscrowV1 is

emit EscrowCreated(escrowId, msg.sender, _seller, _token, _amount, _deadline);

if (registry != address(0)) {
IRegistry(registry).indexEscrow(escrowId, msg.sender, _seller, _amount, block.timestamp);
address registry_ = registry;
if (registry_ != address(0)) {
IRegistry(registry_).indexEscrow(escrowId, msg.sender, _seller, _amount, block.timestamp);
}

return escrowId;
Expand Down Expand Up @@ -369,8 +370,9 @@ contract SafeBaseEscrowV1 is
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}

function _updateRegistryState(uint256 _escrowId) internal {
if (registry != address(0)) {
IRegistry(registry).updateEscrowState(_escrowId, uint8(escrows[_escrowId].state));
address registry_ = registry;
if (registry_ != address(0)) {
IRegistry(registry_).updateEscrowState(_escrowId, uint8(escrows[_escrowId].state));
}
}

Expand Down