mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-03 12:24:27 +01:00
reject zero send amounts (#799)
This commit is contained in:
@@ -65,6 +65,10 @@ where
|
||||
C: NodeClient,
|
||||
K: Keychain,
|
||||
{
|
||||
if slate.amount == 0 {
|
||||
return Err(Error::InvalidAmount);
|
||||
}
|
||||
|
||||
let mut ret_slate = slate.clone();
|
||||
if ret_slate.state != SlateState::Standard1 {
|
||||
return Err(Error::SlateState);
|
||||
|
||||
@@ -534,6 +534,10 @@ where
|
||||
C: NodeClient,
|
||||
K: Keychain,
|
||||
{
|
||||
if args.amount == 0 {
|
||||
return Err(Error::InvalidAmount);
|
||||
}
|
||||
|
||||
let payment_proof_address = if let Some(a) = &args.payment_proof_recipient_address {
|
||||
if a.valid_network() {
|
||||
Some(a)
|
||||
@@ -657,6 +661,10 @@ where
|
||||
C: NodeClient,
|
||||
K: Keychain,
|
||||
{
|
||||
if args.amount == 0 {
|
||||
return Err(Error::InvalidAmount);
|
||||
}
|
||||
|
||||
let parent_key_id = match args.dest_acct_name {
|
||||
Some(d) => {
|
||||
let pm = w.get_acct_path(d)?;
|
||||
@@ -710,6 +718,10 @@ where
|
||||
C: NodeClient,
|
||||
K: Keychain,
|
||||
{
|
||||
if slate.amount == 0 {
|
||||
return Err(Error::InvalidAmount);
|
||||
}
|
||||
|
||||
let mut ret_slate = slate.clone();
|
||||
check_ttl(w, &ret_slate)?;
|
||||
let parent_key_id = match args.src_acct_name {
|
||||
|
||||
Reference in New Issue
Block a user