reject zero send amounts (#799)

This commit is contained in:
wiesche
2026-09-21 20:41:34 +02:00
committed by GitHub
parent f31f307767
commit 4a487390bd
8 changed files with 104 additions and 14 deletions
+4
View File
@@ -24,6 +24,10 @@ use grin_store;
/// Wallet errors, mostly wrappers around underlying crypto or I/O errors.
#[derive(Clone, Eq, PartialEq, Debug, thiserror::Error, Serialize, Deserialize)]
pub enum Error {
/// Invalid transaction amount
#[error("Invalid amount (must be greater than zero)")]
InvalidAmount,
/// Not enough funds
#[error("Not enough funds. Required: {needed_disp:?}, Available: {available_disp:?}")]
NotEnoughFunds {