wallet-cli: add subcommand for aborting txns
This commit is contained in:
parent
1fceb13517
commit
81157c519b
@ -330,6 +330,25 @@ transactionsCli
|
||||
});
|
||||
});
|
||||
|
||||
transactionsCli
|
||||
.subcommand("abortTransaction", "delete", {
|
||||
help: "Abort a transaction.",
|
||||
})
|
||||
.requiredArgument("transactionId", clk.STRING, {
|
||||
help: "Identifier of the transaction to delete",
|
||||
})
|
||||
.flag("force", ["--force"], {
|
||||
help: "Force aborting the transaction. Might lose money."
|
||||
})
|
||||
.action(async (args) => {
|
||||
await withWallet(args, async (wallet) => {
|
||||
await wallet.client.call(WalletApiOperation.AbortTransaction, {
|
||||
transactionId: args.abortTransaction.transactionId,
|
||||
forceImmediateAbort: args.abortTransaction.force,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
walletCli
|
||||
.subcommand("version", "version", {
|
||||
help: "Show version details.",
|
||||
|
Loading…
Reference in New Issue
Block a user