pub fn cancel_tx(
		&self,
		keychain_mask: Option<&SecretKey>,
		tx_id: Option<u32>,
		tx_slate_id: Option<Uuid>,
	) -> Result<(), Error> {
		let tx = {
			let t = self.status_tx.lock();
			t.clone()
		};
		owner::cancel_tx(
			self.wallet_inst.clone(),
			keychain_mask,
			&tx,
			tx_id,
			tx_slate_id,
		)
	}
/// Cancels a transaction. This entails:
/// * Setting the transaction status to either `TxSentCancelled` or `TxReceivedCancelled`
/// * Deleting all change outputs or recipient outputs associated with the transaction
/// * Setting the status of all assocatied inputs from `Locked` to `Spent` so they can be
/// used in new transactions.
///
/// Transactions can be cancelled by transaction log id or slate id (call with either set to
/// Some, not both)
///
/// # Arguments
///
/// * `keychain_mask` - Wallet secret mask to XOR against the stored wallet seed before using, if
/// being used.
/// * `tx_id` - If present, cancel by the [`TxLogEntry`](../mimble_wallet_libwallet/types/struct.TxLogEntry.html) id
/// for the transaction.
///
/// * `tx_slate_id` - If present, cancel by the Slate id.
///
/// # Returns
/// * `Ok(())` if successful
/// * or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Owner.html#method.new) method above.
/// ```
/// # mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
///
/// let mut api_owner = Owner::new(wallet.clone(), None, None);
/// let args = InitTxArgs {
///     src_acct_name: None,
///     amount: 2_000_000_000,
///     minimum_confirmations: 10,
///     max_outputs: 500,
///     num_change_outputs: 1,
///     selection_strategy_is_use_all: false,
///     message: Some("Cancel this tx".to_owned()),
///     ..Default::default()
/// };
/// let result = api_owner.init_send_tx(
/// 	None,
/// 	args,
/// 	None,
/// 	1,
/// );
///
/// if let Ok(slate) = result {
///		// Send slate somehow
///		// ...
///		// Lock our outputs if we're happy the slate was (or is being) sent
///		let res = api_owner.tx_lock_outputs(None, &slate, None, 0);
///		//
///		// We didn't get the slate back, or something else went wrong
///		//
///		let res = api_owner.cancel_tx(None, None, Some(slate.id.clone()));
/// }
/// ```
Cancels a transaction.

Transactions can be cancelled by transaction log id or slate id (call with either set to
Some, not both)
Cancels a transaction . Transactions can be cancelled by transaction log id or slate id ( call with either set to Some not both )
pub fn cancel_tx(
		&self,
		keychain_mask: Option<&SecretKey>,
		tx_id: Option<u32>,
		tx_slate_id: Option<Uuid>,
	) -> Result<(), Error> {
		let tx = {
			let t = self.status_tx.lock();
			t.clone()
		};
		owner::cancel_tx(
			self.wallet_inst.clone(),
			keychain_mask,
			&tx,
			tx_id,
			tx_slate_id,
		)
	}
pub fn cancel_tx ( & self , keychain_mask : Option < & SecretKey > , tx_id : Option < u32 > , tx_slate_id : Option < Uuid > , ) -> Result < ( ) , Error > { let tx = { let t = self . status_tx . lock ( ) ; t . clone ( ) } ; owner :: cancel_tx ( self . wallet_inst . clone ( ) , keychain_mask , & tx , tx_id , tx_slate_id , ) }
Cancels a transaction.
Cancels a transaction .
&self
keychain_mask
Option<&SecretKey>
tx_id
Option<u32>
tx_slate_id
Option<Uuid>
`Ok(())` if successful
or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
` Ok (( )) ` if successful or [ ` libwallet :: Error ` ] ( .. / mimble_wallet_libwallet / struct . Error . html ) if an error is encountered .
&self
keychain_mask
Option<&SecretKey>
tx_id
Option<u32>
tx_slate_id
Option<Uuid>
example
Set up as in [`new`](struct.Owner.html#method.new) method above.
Set up as in [ ` new ` ] ( struct . Owner . html#method . new ) method above .
mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
let mut api_owner = Owner::new(wallet.clone(), None, None);
let args = InitTxArgs {
src_acct_name: None,
amount: 2_000_000_000,
minimum_confirmations: 10,
max_outputs: 500,
num_change_outputs: 1,
selection_strategy_is_use_all: false,
message: Some("Cancel this tx".to_owned()),
Default::default()
};
let result = api_owner.init_send_tx(
None,
args,
None,
1,
).

if let Ok(slate) = result {
Send slate somehow

Lock our outputs if we're happy the slate was (or is being) sent
let res = api_owner.tx_lock_outputs(None, &slate, None, 0).

We didn't get the slate back, or something else went wrong

let res = api_owner.cancel_tx(None, None, Some(slate.id.clone()));
}
```
let mut api_owner = Owner :: new ( wallet . clone () None None ) ; let args = InitTxArgs { src_acct_name : None amount : 2_000_000_000 minimum_confirmations : 10 max_outputs : 500 num_change_outputs : 1 selection_strategy_is_use_all : false message : Some ( " Cancel this tx " . to_owned () ) Default :: default () } ; let result = api_owner . init_send_tx ( None args None 1 ) . if let Ok ( slate ) = result { Send slate somehow Lock our outputs if we ' re happy the slate was ( or is being ) sent let res = api_owner . tx_lock_outputs ( None &slate None 0 ) . We didn ' t get the slate back or something else went wrong let res = api_owner . cancel_tx ( None None Some ( slate . id . clone () )) ; } ` ` `