Improve airdrop confirmation logic
This commit is contained in:
		
				
					committed by
					
						
						Tyera Eulberg
					
				
			
			
				
	
			
			
			
						parent
						
							6b777b066a
						
					
				
				
					commit
					af1283e92c
				
			@@ -328,12 +328,12 @@ pub fn process_command(config: &WalletConfig) -> Result<String, Box<error::Error
 | 
				
			|||||||
                    .as_i64()
 | 
					                    .as_i64()
 | 
				
			||||||
                    .unwrap_or(previous_balance);
 | 
					                    .unwrap_or(previous_balance);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if previous_balance != current_balance {
 | 
					                if previous_balance < current_balance {
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                println!(".");
 | 
					                println!(".");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if current_balance - previous_balance != tokens {
 | 
					            if current_balance - previous_balance < tokens {
 | 
				
			||||||
                Err("Airdrop failed!")?;
 | 
					                Err("Airdrop failed!")?;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            Ok(format!("Your balance is: {:?}", current_balance))
 | 
					            Ok(format!("Your balance is: {:?}", current_balance))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user