Skip to content

Commit

Permalink
Add failing test for incorrect zip321 amount parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Mar 6, 2024
1 parent eaabc0f commit 6b4942f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zcash_client_backend/src/zip321.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,11 @@ mod tests {
"zcash:?amount.10000=1.23&address.10000=tmEZhbWHTpdKMw5it8YDspUXSMGQyFwovpU";
let i10r = TransactionRequest::from_uri(&TEST_NETWORK, invalid_10);
assert!(i10r.is_err());

// invalid: bad amount format
let invalid_11 = "zcash:?address=tmEZhbWHTpdKMw5it8YDspUXSMGQyFwovpU&amount=123.";
let i11r = TransactionRequest::from_uri(&TEST_NETWORK, invalid_11);
assert!(i11r.is_err());
}

proptest! {
Expand Down

0 comments on commit 6b4942f

Please sign in to comment.