Skip to content

Commit 3d40efd

Browse files
chore: DEFI-2534: clean up transfer command (#68)
1 parent 589139b commit 3d40efd

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ async function stakeNeuron(stake: TokenAmountV2) {
443443
err(`Cannot stake less than ${error.minimumAmount} e8s`);
444444
} else if (error instanceof InsufficientFundsError) {
445445
err(
446-
`Your account has insufficient funds (${
447-
(error as InsufficientFundsError).balance
446+
`Your account has insufficient funds (${(error as InsufficientFundsError).balance
448447
} e8s)`
449448
);
450449
} else {
@@ -819,8 +818,8 @@ function err(error: any) {
819818
error instanceof GovernanceError
820819
? error.detail.error_message
821820
: error instanceof Error
822-
? error.message
823-
: error;
821+
? error.message
822+
: error;
824823
log(`${chalk.bold(chalk.red("Error:"))} ${message}`);
825824
}
826825

@@ -845,19 +844,19 @@ async function main() {
845844
.addCommand(
846845
new Command("transfer")
847846
.description("Send tokens from the ICRC wallet to another account.")
848-
.option(
847+
.requiredOption(
849848
"--canister-id <canister-id>",
850-
"Canister ID (defaults to ICP Ledger)",
849+
"ICRC ledger Canister ID",
851850
tryParsePrincipal
852851
)
853852
.requiredOption(
854-
"--to <account-identifier>",
853+
"--to <account>",
855854
"ICRC Account",
856855
tryParseIcrcAccount
857856
)
858857
.requiredOption(
859858
"--amount <amount>",
860-
"Amount to transfer in e8s",
859+
"Amount to transfer in ledger's base unit",
861860
tryParseBigInt
862861
)
863862
.action(({ to, amount, canisterId }) => {

0 commit comments

Comments
 (0)