Skip to content

Commit

Permalink
add optional comment arg
Browse files Browse the repository at this point in the history
Signed-off-by: Swapnil Tripathi <[email protected]>
  • Loading branch information
swaptr committed Oct 26, 2023
1 parent f307c99 commit 8c154fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions uniffi_aries_vcx/core/src/handlers/holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ impl Holder {
)?)
}

pub fn decline_offer(&self) -> VcxUniFFIResult<String> {
pub fn decline_offer(&self, comment: Option<String>) -> VcxUniFFIResult<String> {
let handler = self.handler.lock()?;

Ok(serde_json::to_string(
&handler.clone().decline_offer(Some(""))?,
&handler
.clone()
.decline_offer(Some(&comment.unwrap_or("".to_owned())))?,
)?)
}

Expand Down
2 changes: 1 addition & 1 deletion uniffi_aries_vcx/core/src/vcx.udl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface Holder {
string get_msg_credential_request();

[Throws=VcxUniFFIError]
string decline_offer();
string decline_offer(string? comment);

[Throws=VcxUniFFIError]
void process_credential(ProfileHolder profile, string credential);
Expand Down

0 comments on commit 8c154fe

Please sign in to comment.