Skip to content

Commit

Permalink
shorten to colo
Browse files Browse the repository at this point in the history
  • Loading branch information
at2005 committed Oct 1, 2024
1 parent 6c52cb2 commit 9602fba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lib/buy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface SfBuyOptions {
start?: string;
yes?: boolean;
quote?: boolean;
colocate_with?: Array<string>;
colo?: Array<string>;
}

export function registerBuy(program: Command) {
Expand All @@ -55,7 +55,7 @@ export function registerBuy(program: Command) {
.option("-s, --start <start>", "Specify the start date")
.option("-y, --yes", "Automatically confirm the order")
.option(
"-e, --colocate <contracts_to_colocate_with>",
"-c, --colo <contracts_to_colocate_with>",
"Colocate with existing contracts",
(value) => value.split(","),
[],
Expand All @@ -81,9 +81,7 @@ async function buyOrderAction(options: SfBuyOptions) {
}

// parse colocation contract id and assign it if it exists
const colocateWithContractIds = options.colocate_with
? options.colocate_with
: [];
const colocateWithContractIds = options.colo ? options.colo : [];
if (colocateWithContractIds) {
// check if contract actually exists
for (const contractId of colocateWithContractIds) {
Expand Down

0 comments on commit 9602fba

Please sign in to comment.