Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Nov 1, 2024
1 parent 140a22d commit fa77b26
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Other optional arguments are:
- `--retries`, Option to specify how many retries should be done for the same order, max value is 3, default is 1 if left unspecified, Will override the 'RETRIES' in env variables
- `--pool-update-interval`, Option to specify time (in minutes) between pools updates, default is 15 minutes, Will override the 'POOL_UPDATE_INTERVAL' in env variables
- `--self-fund-orders`, Specifies owned order to get funded once their vault goes below the specified threshold, example: token,vaultId,threshold,toptupamount;token,vaultId,threshold,toptupamount;... . Will override the 'SELF_FUND_ORDERS' in env variables
- `--route`, Specifies the routing mode 'multi' or 'single'. Will override the 'ROUTE' in env variables
- `--route`, Specifies the routing mode 'multi' or 'single' or 'full', default is 'single'. Will override the 'ROUTE' in env variables
- `-w` or `--wallet-count`, Number of wallet to submit transactions with, requirs `--mnemonic`. Will override the 'WALLET_COUNT' in env variables
- `-t` or `--topup-amount`, The initial topup amount of excess wallets, requirs `--mnemonic`. Will override the 'TOPUP_AMOUNT' in env variables
- `-V` or `--version`, output the version number
Expand Down Expand Up @@ -223,7 +223,7 @@ BOT_MIN_BALANCE=
# example: token,vaultId,threshold,toptupamount;token,vaultId,threshold,toptupamount;...
SELF_FUND_ORDERS=

# Specifies the routing mode 'multi' or 'single',
# Specifies the routing mode 'multi' or 'single' or 'full', default is 'single'
ROUTE="single"
```
If both env variables and CLI argument are set, the CLI arguments will be prioritized and override the env variables.
Expand Down
2 changes: 1 addition & 1 deletion example.env
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ BOT_MIN_BALANCE=
# example: token,vaultId,threshold,toptupamount;token,vaultId,threshold,toptupamount;...
SELF_FUND_ORDERS=

# Specifies the routing mode 'multi' or 'single',
# Specifies the routing mode 'multi' or 'single' or 'full', default is 'single'
ROUTE="single"


Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const getOptions = async (argv: any, version?: string) => {
)
.option(
"--route <string>",
"Specifies the routing mode 'multi' or 'single'. Will override the 'ROUTE' in env variables",
"Specifies the routing mode 'multi' or 'single' or 'full', default is 'single'. Will override the 'ROUTE' in env variables",
)
.description(
[
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ export async function getConfig(
} else throw "invalid retries value, must be an integer between 1 - 3";
}

let route: "single" | "multi" | undefined;
let route: "single" | "multi" | undefined = "single";
if (options.route) {
const temp = options.route.toLowerCase();
if (temp === "full") route = undefined;
if (temp === "multi") route = "multi";
if (temp === "single") route = "single";
}
Expand Down

0 comments on commit fa77b26

Please sign in to comment.