diff --git a/e2e/e2etests/test_operation_add_liquidity_erc20.go b/e2e/e2etests/test_operation_add_liquidity_erc20.go index 0b39580e37..b52d22391e 100644 --- a/e2e/e2etests/test_operation_add_liquidity_erc20.go +++ b/e2e/e2etests/test_operation_add_liquidity_erc20.go @@ -8,15 +8,18 @@ import ( "github.com/zeta-chain/zetacore/e2e/runner" ) -// TestOperationAddLiquidityETH is an operational test to add liquidity in gas token -func TestOperationAddLiquidityETH(r *runner.E2ERunner, args []string) { +// TestOperationAddLiquidityERC20 is an operational test to add liquidity in erc20 token +func TestOperationAddLiquidityERC20(r *runner.E2ERunner, args []string) { require.Len(r, args, 2) - // #nosec G115 e2e - always in range - liqZETA := big.NewInt(int64(parseInt(r, args[0]))) - // #nosec G115 e2e - always in range - liqETH := big.NewInt(int64(parseInt(r, args[1]))) + liqZETA := big.NewInt(0) + _, ok := liqZETA.SetString(args[0], 10) + require.True(r, ok, "Invalid amount specified for TestOperationAddLiquidityERC20") + + liqERC20 := big.NewInt(0) + _, ok = liqERC20.SetString(args[1], 10) + require.True(r, ok, "Invalid amount specified for TestOperationAddLiquidityERC20") // perform the add liquidity - r.AddLiquidityETH(liqZETA, liqETH) + r.AddLiquidityERC20(liqZETA, liqERC20) } diff --git a/e2e/e2etests/test_operation_add_liquidity_eth.go b/e2e/e2etests/test_operation_add_liquidity_eth.go index f7b5b251c8..dae3ae4c65 100644 --- a/e2e/e2etests/test_operation_add_liquidity_eth.go +++ b/e2e/e2etests/test_operation_add_liquidity_eth.go @@ -8,15 +8,18 @@ import ( "github.com/zeta-chain/zetacore/e2e/runner" ) -// TestOperationAddLiquidityERC20 is an operational test to add liquidity in erc20 token -func TestOperationAddLiquidityERC20(r *runner.E2ERunner, args []string) { +// TestOperationAddLiquidityETH is an operational test to add liquidity in gas token +func TestOperationAddLiquidityETH(r *runner.E2ERunner, args []string) { require.Len(r, args, 2) - // #nosec G115 e2e - always in range - liqZETA := big.NewInt(int64(parseInt(r, args[0]))) - // #nosec G115 e2e - always in range - liqERC20 := big.NewInt(int64(parseInt(r, args[1]))) + liqZETA := big.NewInt(0) + _, ok := liqZETA.SetString(args[0], 10) + require.True(r, ok, "Invalid amount specified for TestOperationAddLiquidityETH") + + liqETH := big.NewInt(0) + _, ok = liqETH.SetString(args[1], 10) + require.True(r, ok, "Invalid amount specified for TestOperationAddLiquidityETH") // perform the add liquidity - r.AddLiquidityERC20(liqZETA, liqERC20) + r.AddLiquidityETH(liqZETA, liqETH) }