Skip to content
This repository was archived by the owner on Jul 31, 2019. It is now read-only.

Commit 1263faa

Browse files
hadleymrytmarsh
authored andcommitted
Send Credential Request Bug Fix (#315)
* Fixes bug with Sending Credential Request with No Payment Info * Fixes bug with Sending Credential Request with No Payment Info * Add test mode logic * Fix A Space
1 parent fba6a54 commit 1263faa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vcx/libvcx/src/credential.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,12 @@ impl Credential {
146146
let req = serde_json::to_string(&req).or(Err(CredentialError::InvalidCredentialJson()))?;
147147
let data: Vec<u8> = connection::generate_encrypted_payload(local_my_vk, local_their_vk, &req, "CLAIM_REQ").map_err(|e| CredentialError::CommonError(e.to_error_code()))?;
148148
let offer_msg_id = self.credential_offer.as_ref().unwrap().msg_ref_id.as_ref().ok_or(CredentialError::CommonError(error::CREATE_CREDENTIAL_REQUEST_ERROR.code_num))?;
149-
150149
if settings::test_agency_mode_enabled() { httpclient::set_next_u8_response(SEND_MESSAGE_RESPONSE.to_vec()); }
151-
let _receipt = self.submit_payment()?;
150+
151+
if self.payment_info.is_some() {
152+
let _receipt = self.submit_payment()?;
153+
}
154+
152155
match messages::send_message().to(local_my_did)
153156
.to_vk(local_my_vk)
154157
.msg_type("claimReq")

0 commit comments

Comments
 (0)