Skip to content

Commit

Permalink
update client id schemes supported
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate committed Nov 21, 2024
1 parent dcc962b commit 7c44761
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ impl WalletMetadata {
Ok(())
}

/// Add a client ID scheme to the list of the client ID schemes supported.
/// Appends the client ID schemes to the list of the client ID schemes supported.
///
/// This method will construct a `client_id_schemes_supported` proprety in the
/// wallet metadata if none exists previously, otherwise, this method will add
/// the client ID scheme to the existing list of the client ID schemes supported.
/// This method will construct a `client_id_schemes_supported` property in the
/// wallet metadata if none exists previously, otherwise, this method will append
/// the client ID schemes to the existing list of the client ID schemes supported.
pub fn add_client_id_schemes_supported(
&mut self,
client_id_scheme: ClientIdScheme,
client_id_schemes: &[ClientIdScheme],
) -> Result<()> {
let mut supported = self.0.get_or_default::<ClientIdSchemesSupported>()?;

// Insert the scheme.
supported.0.push(client_id_scheme);
supported.0.extend_from_slice(client_id_schemes);

// Insert the updated client IDs schemes supported.
self.0.insert(supported);
Expand Down

0 comments on commit 7c44761

Please sign in to comment.