Add a failing test for ZIP 321 URI without params
This commit is contained in:
parent
bf6ad58a02
commit
29af0bcb29
|
@ -811,6 +811,27 @@ mod tests {
|
||||||
assert_eq!(parse_result, expected);
|
assert_eq!(parse_result, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_zip321_parse_no_query_params() {
|
||||||
|
let uri = "zcash:ztestsapling1n65uaftvs2g7075q2x2a04shfk066u3lldzxsrprfrqtzxnhc9ps73v4lhx4l9yfxj46sl0q90k";
|
||||||
|
let parse_result = TransactionRequest::from_uri(&TEST_NETWORK, uri).unwrap();
|
||||||
|
|
||||||
|
let expected = TransactionRequest {
|
||||||
|
payments: vec![
|
||||||
|
Payment {
|
||||||
|
recipient_address: RecipientAddress::Shielded(decode_payment_address(TEST_NETWORK.hrp_sapling_payment_address(), "ztestsapling1n65uaftvs2g7075q2x2a04shfk066u3lldzxsrprfrqtzxnhc9ps73v4lhx4l9yfxj46sl0q90k").unwrap()),
|
||||||
|
amount: Amount::from_u64(0).unwrap(),
|
||||||
|
memo: None,
|
||||||
|
label: None,
|
||||||
|
message: None,
|
||||||
|
other_params: vec![],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
assert_eq!(parse_result, expected);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_zip321_roundtrip_empty_message() {
|
fn test_zip321_roundtrip_empty_message() {
|
||||||
let req = TransactionRequest {
|
let req = TransactionRequest {
|
||||||
|
|
Loading…
Reference in New Issue