Skip to content

Commit

Permalink
dan comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx committed Feb 7, 2023
1 parent 8da00cf commit d6cbdeb
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/protocol/contracts/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,17 @@ contract Bridge is EssentialContract, IBridge {

/// Allow Bridge to receive ETH from the TokenVault or EtherVault.
receive() external payable {
<<<<<<< HEAD
// TODO(dave,PR#13110): require the sender is the TokenVault or EtherVault
=======
// If on Ethereum, ensure sender is TokenVault. If on Taiko, ensure
// sender is TokenVault or EtherVault.
require(
address(0) == this.resolve("ether_vault", true)
? msg.sender == this.resolve("token_vault", false)
: (msg.sender == this.resolve("token_vault", false) ||
msg.sender == this.resolve("ether_vault", true)),
"B:receive"
);
>>>>>>> 6319132b (dirty save)
if (address(0) == this.resolve("ether_vault", true)) {
require(msg.sender == this.resolve("token_vault", false));
} else {
// on Taiko
require(
msg.sender == this.resolve("token_vault", false) ||
msg.sender == this.resolve("ether_vault", true)
);
}
}

/// @dev Initializer to be called after being deployed behind a proxy.
Expand Down

0 comments on commit d6cbdeb

Please sign in to comment.