/// Function to process the make it rain transaction function
Function to process the make it rain transaction function
Function to process the make it rain transaction function
fn process_make_it_rain(&mut self, command_arg: Vec<String>) {
        // args: [Txs/s] [duration (s)] [start amount (uT)] [increment (uT)/Tx]
        //       [\"start time (UTC)\" / 'now' for immediate start] [public key or emoji id to send to] [message]
        let command_error_msg =
            "Command entered incorrectly, please use the following format:\n".to_owned() + MAKE_IT_RAIN_USAGE;
        // [Txs/s] [duration (s)] [start amount (uT)] [increment (uT)/Tx] [start time (UTC) / 'now'] [public key or
        // emoji id to send to] [message]
        let (tx_per_s, number_of_txs, start_amount, amount_inc, time_utc_start, dest_pubkey, msg) =
            match get_make_it_rain_tx_values(command_arg) {
                Some(v) => {
                    if v.err_msg != "" {
                        println!("\n{}", command_error_msg);
                        println!("\n{}\n", v.err_msg);
                        return;
                    }
                    (
                        v.tx_per_s,
                        v.number_of_txs,
                        v.start_amount,
                        v.amount_inc,
                        v.time_utc_start,
                        v.dest_pubkey,
                        v.msg,
                    )
                },
                None => {
                    println!("Cannot process the 'make-it-rain' command");
                    return;
                },
            };
        let executor = self.executor.clone();
        let mut wallet_transaction_service = match self.wallet_transaction_service.clone() {
            Some(v) => v,
            _ => {
                println!("Error: Problem with TransactionServiceHandle");
                return;
            },
        };
        self.executor.spawn(async move {
            make_it_rain(
                &mut wallet_transaction_service,
                executor,
                tx_per_s,
                number_of_txs,
                start_amount,
                amount_inc,
                time_utc_start,
                dest_pubkey.clone(),
                msg.clone(),
            )
            .await;
        });
    }
fn process_make_it_rain ( & mut self , command_arg : Vec < String > ) { // args: [Txs/s] [duration (s)] [start amount (uT)] [increment (uT)/Tx] //       [\"start time (UTC)\" / 'now' for immediate start] [public key or emoji id to send to] [message] let command_error_msg = " \n " . to_owned ( ) + MAKE_IT_RAIN_USAGE ; // [Txs/s] [duration (s)] [start amount (uT)] [increment (uT)/Tx] [start time (UTC) / 'now'] [public key or // emoji id to send to] [message] let ( tx_per_s , number_of_txs , start_amount , amount_inc , time_utc_start , dest_pubkey , msg ) = match get_make_it_rain_tx_values ( command_arg ) { Some ( v ) => { if v . err_msg != " " { println ! ( " \n " command_error_msg ) ; println ! ( " \n \n " v err_msg ) ; return ; } ( v . tx_per_s , v . number_of_txs , v . start_amount , v . amount_inc , v . time_utc_start , v . dest_pubkey , v . msg , ) } , None => { println ! ( " " ) ; return ; } , } ; let executor = self . executor . clone ( ) ; let mut wallet_transaction_service = match self . wallet_transaction_service . clone ( ) { Some ( v ) => v , _ => { println ! ( " " ) ; return ; } , } ; self . executor . spawn ( async move { make_it_rain ( & mut wallet_transaction_service , executor , tx_per_s , number_of_txs , start_amount , amount_inc , time_utc_start , dest_pubkey . clone ( ) , msg . clone ( ) , ) . await ; } ) ; }
Function to process the make it rain transaction function
Function to process the make it rain transaction function
&mut self
command_arg
Vec<String>