Skip to content

Commit

Permalink
remove adaptor and isRecovery from _dispatch()
Browse files Browse the repository at this point in the history
  • Loading branch information
AStox committed Jul 12, 2024
1 parent 868531b commit c0db525
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gateway/Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ contract Gateway is Auth, IGateway {
bool isMessageProof = call == uint8(MessagesLib.Call.MessageProof);
if (adapter.quorum == 1 && !isMessageProof) {
// Special case for gas efficiency
_dispatch(payload, adapter_, isRecovery, isBatched);
_dispatch(payload, isBatched);
emit ExecuteMessage(payload, adapter_);
return;
}
Expand Down Expand Up @@ -177,9 +177,9 @@ contract Gateway is Auth, IGateway {

// Handle message
if (isMessageProof) {
_dispatch(state.pendingMessage, adapter_, isRecovery, isBatched);
_dispatch(state.pendingMessage, isBatched);
} else {
_dispatch(payload, adapter_, isRecovery, isBatched);
_dispatch(payload, isBatched);
}

// Only if there are no more pending messages, remove the pending message
Expand All @@ -193,7 +193,7 @@ contract Gateway is Auth, IGateway {
}
}

function _dispatch(bytes memory message, address _adapter, bool isRecovery, bool isBatched) internal {
function _dispatch(bytes memory message, bool isBatched) internal {
uint8 id = message.toUint8(0);
address manager;

Expand All @@ -216,7 +216,7 @@ contract Gateway is Auth, IGateway {
for (uint256 i = 0; i < length; i++) {
subMessage[i] = message[start + 2 + i];
}
_dispatch(subMessage, _adapter, isRecovery, true);
_dispatch(subMessage, true);

start += 2 + length;
}
Expand Down

0 comments on commit c0db525

Please sign in to comment.