diff --git a/snapshots/inputSettler.json b/snapshots/inputSettler.json index b02bdb1..7defb04 100644 --- a/snapshots/inputSettler.json +++ b/snapshots/inputSettler.json @@ -2,7 +2,7 @@ "CompactFinaliseFor": "101978", "CompactFinaliseSelf": "94961", "CompactFinaliseTo": "94961", - "EscrowFinalise": "42401", + "EscrowFinalise": "44564", "IntegrationCoinFill": "64331", "IntegrationCompactFinaliseSelf": "85815", "IntegrationWormholeReceiveMessage": "45670", @@ -10,8 +10,8 @@ "broadcast": "14904", "compactFinaliseSelfWithFee": "164791", "depositAndRegisterFor": "128947", - "escrowFinaliseSelfWithFee": "106842", - "escrowFinaliseWithSignature": "49799", + "escrowFinaliseSelfWithFee": "106906", + "escrowFinaliseWithSignature": "51962", "escrowOpen": "55155", "escrowOpenFor3009Single": "89408", "escrowOpenFor3009SingleArray": "99750", diff --git a/src/input/escrow/InputSettlerEscrowLIFI.sol b/src/input/escrow/InputSettlerEscrowLIFI.sol index e540998..c8ec63d 100644 --- a/src/input/escrow/InputSettlerEscrowLIFI.sol +++ b/src/input/escrow/InputSettlerEscrowLIFI.sol @@ -218,7 +218,8 @@ contract InputSettlerEscrowLIFI is InputSettlerEscrow, GovernanceFee { // revert and it will unmark it. This acts as a reentry check. orderStatus[orderId] = newStatus; - uint256 fee = governanceFee; + address _owner = owner(); + uint64 fee = _owner != address(0) ? governanceFee : 0; // We have now ensured that this point can only be reached once. We can now process the asset delivery. uint256 numInputs = inputs.length; for (uint256 i; i < numInputs; ++i) { @@ -228,7 +229,7 @@ contract InputSettlerEscrowLIFI is InputSettlerEscrow, GovernanceFee { uint256 calculatedFee = _calcFee(amount, fee); if (calculatedFee > 0) { - SafeTransferLib.safeTransfer(token, owner(), calculatedFee); + SafeTransferLib.safeTransfer(token, _owner, calculatedFee); unchecked { amount = amount - calculatedFee; }