used params.chainId instead of bool to check

This commit is contained in:
pradyuman-verma 2022-04-12 21:53:55 +05:30
parent 595e4fb620
commit 382366e006
No known key found for this signature in database
GPG Key ID: E36FD6BC8923221F
3 changed files with 6 additions and 21 deletions

View File

@ -18,19 +18,14 @@ abstract contract Resolver is Helpers {
* @dev Bridge Token.
* @notice Bridge Token on HOP.
* @param params BridgeParams struct for bridging
* @param bridgeToL1 bool to check which layer to migrate to
* @param getId ID to retrieve amount from last spell.
*/
function bridge(
BridgeParams memory params,
bool bridgeToL1,
uint256 getId
)
function bridge(BridgeParams memory params, uint256 getId)
external
payable
returns (string memory _eventName, bytes memory _eventParam)
{
if (bridgeToL1) {
if (params.chainId == 1) {
require(
params.destinationAmountOutMin == 0,
"destinationAmountOutMin != 0, sending to L1"

View File

@ -18,19 +18,14 @@ abstract contract Resolver is Helpers {
* @dev Bridge Token.
* @notice Bridge Token on HOP.
* @param params BridgeParams struct for bridging
* @param bridgeToL1 bool to check which layer to migrate to
* @param getId ID to retrieve amount from last spell.
*/
function bridge(
BridgeParams memory params,
bool bridgeToL1,
uint256 getId
)
function bridge(BridgeParams memory params, uint256 getId)
external
payable
returns (string memory _eventName, bytes memory _eventParam)
{
if (bridgeToL1) {
if (params.chainId == 1) {
require(
params.destinationAmountOutMin == 0,
"destinationAmountOutMin != 0, sending to L1"

View File

@ -18,19 +18,14 @@ abstract contract Resolver is Helpers {
* @dev Bridge Token.
* @notice Bridge Token on HOP.
* @param params BridgeParams struct for bridging
* @param bridgeToL1 bool to check which layer to migrate to
* @param getId ID to retrieve amount from last spell.
*/
function bridge(
BridgeParams memory params,
bool bridgeToL1,
uint256 getId
)
function bridge(BridgeParams memory params, uint256 getId)
external
payable
returns (string memory _eventName, bytes memory _eventParam)
{
if (bridgeToL1) {
if (params.chainId == 1) {
require(
params.destinationAmountOutMin == 0,
"destinationAmountOutMin != 0, sending to L1"