cancelOrder Params

Why is this defined in so many places
This commit is contained in:
Snarling 2022-08-19 19:49:09 -04:00
parent 4001b4cbb0
commit 2aca8476b6
5 changed files with 10 additions and 10 deletions

@ -13,8 +13,8 @@ import { PositionTypes } from "../data/PositionTypes";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { EventEmitter } from "../../utils/EventEmitter";
import { WorkerScript } from "../../Netscript/WorkerScript";
import { ICancelOrderParams } from "../StockMarket";
import { NetscriptContext } from "../../Netscript/APIWrapper";
type txFn = (stock: Stock, shares: number) => boolean;
type placeOrderFn = (
@ -28,7 +28,7 @@ type placeOrderFn = (
type IProps = {
buyStockLong: txFn;
buyStockShort: txFn;
cancelOrder: (params: ICancelOrderParams, workerScript?: WorkerScript) => void;
cancelOrder: (params: ICancelOrderParams, ctx?: NetscriptContext) => void;
eventEmitterForReset?: EventEmitter<[]>;
initStockMarket: () => void;
p: IPlayer;

@ -32,7 +32,7 @@ import Collapse from "@mui/material/Collapse";
import ExpandMore from "@mui/icons-material/ExpandMore";
import ExpandLess from "@mui/icons-material/ExpandLess";
import { ICancelOrderParams } from "../StockMarket";
import { WorkerScript } from "../../Netscript/WorkerScript";
import { NetscriptContext } from "../../Netscript/APIWrapper";
enum SelectorOrderType {
Market = "Market Order",
@ -52,7 +52,7 @@ type placeOrderFn = (
type IProps = {
buyStockLong: txFn;
buyStockShort: txFn;
cancelOrder: (params: ICancelOrderParams, workerScript?: WorkerScript) => void;
cancelOrder: (params: ICancelOrderParams, ctx?: NetscriptContext) => void;
orders: Order[];
p: IPlayer;
placeOrder: placeOrderFn;

@ -12,10 +12,10 @@ import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
import Box from "@mui/material/Box";
import { ICancelOrderParams } from "../StockMarket";
import { WorkerScript } from "../../Netscript/WorkerScript";
import { NetscriptContext } from "../../Netscript/APIWrapper";
type IProps = {
cancelOrder: (params: ICancelOrderParams, workerScript?: WorkerScript) => void;
cancelOrder: (params: ICancelOrderParams, ctx?: NetscriptContext) => void;
order: Order;
};

@ -11,10 +11,10 @@ import { Stock } from "../Stock";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { ICancelOrderParams } from "../StockMarket";
import { WorkerScript } from "../../Netscript/WorkerScript";
import { NetscriptContext } from "../../Netscript/APIWrapper";
type IProps = {
cancelOrder: (params: ICancelOrderParams, workerScript?: WorkerScript) => void;
cancelOrder: (params: ICancelOrderParams, ctx?: NetscriptContext) => void;
orders: Order[];
p: IPlayer;
stock: Stock;

@ -15,8 +15,8 @@ import { PositionTypes } from "../data/PositionTypes";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { EventEmitter } from "../../utils/EventEmitter";
import { WorkerScript } from "../../Netscript/WorkerScript";
import { ICancelOrderParams } from "../StockMarket";
import { NetscriptContext } from "../../Netscript/APIWrapper";
type txFn = (stock: Stock, shares: number) => boolean;
type placeOrderFn = (
@ -30,7 +30,7 @@ type placeOrderFn = (
type IProps = {
buyStockLong: txFn;
buyStockShort: txFn;
cancelOrder: (params: ICancelOrderParams, workerScript?: WorkerScript) => void;
cancelOrder: (params: ICancelOrderParams, ctx?: NetscriptContext) => void;
eventEmitterForReset?: EventEmitter<[]>;
p: IPlayer;
placeOrder: placeOrderFn;