diff --git a/controller/tests/contract_accounts.rs b/controller/tests/contract_accounts.rs index ba2e52e..bbf15bc 100644 --- a/controller/tests/contract_accounts.rs +++ b/controller/tests/contract_accounts.rs @@ -167,6 +167,8 @@ fn contract_accounts_impl(test_dir: &'static str) -> Result<(), libwallet::Error net_change: Some(5_000_000_000), ..Default::default() }; + // Proofs are opt-in; enable and supply the sender address. + args.proof_args.suppress_proof = false; args.proof_args.sender_address = sender_address; slate = api.contract_sign(m, &slate, args)?; recipient_address = Some(api.get_slatepack_address(mask2, 0)?.pub_key); diff --git a/controller/tests/contract_early_proofs_rsr.rs b/controller/tests/contract_early_proofs_rsr.rs index 5a01ea0..bb353a1 100644 --- a/controller/tests/contract_early_proofs_rsr.rs +++ b/controller/tests/contract_early_proofs_rsr.rs @@ -65,8 +65,9 @@ fn contract_early_proofs_rsr_test_impl(test_dir: &'static str) -> Result<(), lib }, ..Default::default() }; + // Proofs are opt-in; enable and supply the sender address. + args.setup_args.proof_args.suppress_proof = false; args.setup_args.proof_args.sender_address = sender_address; - println!("SENDER ADDRESS: {:?}", sender_address); slate = api.contract_new(m, args)?; recipient_address = Some(api.get_slatepack_address(recv_mask, 0)?.pub_key); Ok(()) diff --git a/controller/tests/contract_early_proofs_srs.rs b/controller/tests/contract_early_proofs_srs.rs index ffcbb71..c84ad83 100644 --- a/controller/tests/contract_early_proofs_srs.rs +++ b/controller/tests/contract_early_proofs_srs.rs @@ -71,7 +71,8 @@ fn contract_early_proofs_srs_test_impl(test_dir: &'static str) -> Result<(), lib net_change: Some(5_000_000_000), ..Default::default() }; - // Note sender address explicity added here + // Proofs are opt-in; enable and supply the sender address. + args.proof_args.suppress_proof = false; args.proof_args.sender_address = sender_address; slate = api.contract_sign(m, &slate, args)?; recipient_address = Some(api.get_slatepack_address(recv_mask, 0)?.pub_key); diff --git a/controller/tests/contract_rsr.rs b/controller/tests/contract_rsr.rs index 2821950..f41270c 100644 --- a/controller/tests/contract_rsr.rs +++ b/controller/tests/contract_rsr.rs @@ -52,7 +52,6 @@ fn contract_rsr_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> }, ..Default::default() }; - args.setup_args.proof_args.suppress_proof = true; slate = api.contract_new(m, args)?; Ok(()) })?; @@ -74,8 +73,6 @@ fn contract_rsr_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> let args = &mut ContractSetupArgsAPI { ..Default::default() }; - // TODO: This possibly shouldn't be needed here if no proof? - args.proof_args.suppress_proof = true; slate = api.contract_sign(m, &slate, args)?; Ok(()) })?; diff --git a/controller/tests/contract_srs.rs b/controller/tests/contract_srs.rs index 7fb9dcf..a8bff12 100644 --- a/controller/tests/contract_srs.rs +++ b/controller/tests/contract_srs.rs @@ -63,7 +63,6 @@ fn contract_srs_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> net_change: Some(5_000_000_000), ..Default::default() }; - args.proof_args.suppress_proof = true; slate = api.contract_sign(m, &slate, args)?; Ok(()) })?; @@ -74,7 +73,6 @@ fn contract_srs_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> let args = &mut ContractSetupArgsAPI { ..Default::default() }; - args.proof_args.suppress_proof = true; slate = api.contract_sign(m, &slate, args)?; Ok(()) })?; diff --git a/libwallet/src/contract/types.rs b/libwallet/src/contract/types.rs index 10f6aa3..fe34dc1 100644 --- a/libwallet/src/contract/types.rs +++ b/libwallet/src/contract/types.rs @@ -112,7 +112,9 @@ pub struct ProofArgs { impl Default for ProofArgs { fn default() -> ProofArgs { ProofArgs { - suppress_proof: false, + // Proofs are opt-in (#729): a `false` default made the receiver build an + // invoice promise with no sender address, failing with NoSenderAddressProvided. + suppress_proof: true, proof_type: ProofType::Legacy, sender_address: None, }