fix: check for empty amount at request creation

This commit is contained in:
ardocrat 2024-04-22 21:55:34 +03:00
parent e8a0be076f
commit faf47125a5

View file

@ -638,6 +638,9 @@ impl WalletMessages {
columns[1].vertical_centered_justified(|ui| { columns[1].vertical_centered_justified(|ui| {
// Button to create Slatepack message for request. // Button to create Slatepack message for request.
View::button(ui, t!("continue"), Colors::WHITE, || { View::button(ui, t!("continue"), Colors::WHITE, || {
if self.amount_edit.is_empty() {
return;
}
if let Ok(a) = amount_from_hr_string(self.amount_edit.as_str()) { if let Ok(a) = amount_from_hr_string(self.amount_edit.as_str()) {
let message = if self.send_request { let message = if self.send_request {
wallet.send(a) wallet.send(a)