Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup names and comments #1443

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions identity_iota_core/src/rebased/assets/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl<T> AuthenticatedAsset<T> {
/// Destroys this [`AuthenticatedAsset`].
/// # Notes
/// This function doesn't delete the asset right away, but instead creates a [`Transaction`] that
/// can be executed in order to destory the asset.
/// can be executed in order to destroy the asset.
/// # Failures
/// * Returns an [`Error::InvalidConfig`] if this asset cannot be deleted.
pub fn delete(self) -> Result<DeleteAssetTx<T>, Error> {
Expand Down Expand Up @@ -203,7 +203,7 @@ impl<T> AuthenticatedAssetBuilder<T> {

/// Sets whether the new asset allows the transfer of its ownership.
///
/// By default an [`AuthenticatedAsset`] **cannot** be transfered.
/// By default an [`AuthenticatedAsset`] **cannot** be transferred.
pub fn transferable(mut self, transferable: bool) -> Self {
self.transferable = transferable;
self
Expand Down Expand Up @@ -233,7 +233,7 @@ impl<T> AuthenticatedAssetBuilder<T> {
/// owner and a `RecipientCap` to the specified `recipient` address.
/// `recipient` can accept the transfer by presenting its `RecipientCap` (this prevents other users from claiming the
/// asset for themselves).
/// The current owner can cancel the proposal at any time - given the transfer hasn't been conclued yet - by presenting
/// The current owner can cancel the proposal at any time - given the transfer hasn't been concluded yet - by presenting
/// its `SenderCap`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TransferProposal {
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/src/rebased/client/full_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl<S> IdentityClient<S> {
}

/// Query the objects owned by the address wrapped by this client to find the object of type `tag`
/// and that satifies `predicate`.
/// and that satisfies `predicate`.
pub async fn find_owned_ref<P>(&self, tag: StructTag, predicate: P) -> Result<Option<ObjectRef>, Error>
where
P: Fn(&IotaObjectData) -> bool,
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/src/rebased/migration/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl Transaction for MigrateLegacyAliasTx {
S: Signer<IotaKeySignature> + Sync,
{
let response = self.0.execute_with_opt_gas(gas_budget, client).await?.response;
// Make sure the tx was successfull.
// Make sure the tx was successful.
let effects = response
.effects
.as_ref()
Expand Down
6 changes: 3 additions & 3 deletions identity_iota_core/src/rebased/migration/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use crate::rebased::client::IdentityClientReadOnly;
use crate::rebased::client::IotaKeySignature;
use crate::rebased::proposals::BorrowAction;
use crate::rebased::proposals::ConfigChange;
use crate::rebased::proposals::DeactiveDid;
use crate::rebased::proposals::DeactivateDid;
use crate::rebased::proposals::ProposalBuilder;
use crate::rebased::proposals::SendAction;
use crate::rebased::proposals::UpdateDidDocument;
Expand Down Expand Up @@ -165,8 +165,8 @@ impl OnChainIdentity {
}

/// Deactivates the DID Document represented by this [`OnChainIdentity`].
pub fn deactivate_did(&mut self) -> ProposalBuilder<'_, DeactiveDid> {
ProposalBuilder::new(self, DeactiveDid::new())
pub fn deactivate_did(&mut self) -> ProposalBuilder<'_, DeactivateDid> {
ProposalBuilder::new(self, DeactivateDid::new())
}

/// Sends assets owned by this [`OnChainIdentity`] to other addresses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ use super::ProposalT;

/// Action for deactivating a DID Document inside an Identity.
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize)]
pub struct DeactiveDid;
pub struct DeactivateDid;

impl DeactiveDid {
impl DeactivateDid {
pub const fn new() -> Self {
Self
}
}

impl MoveType for DeactiveDid {
impl MoveType for DeactivateDid {
fn move_type(package: ObjectID) -> TypeTag {
use std::str::FromStr;

Expand All @@ -42,8 +42,8 @@ impl MoveType for DeactiveDid {
}

#[async_trait]
impl ProposalT for Proposal<DeactiveDid> {
type Action = DeactiveDid;
impl ProposalT for Proposal<DeactivateDid> {
type Action = DeactivateDid;
type Output = ();

async fn create<'i, S>(
Expand Down
4 changes: 2 additions & 2 deletions identity_iota_core/src/rebased/proposals/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

mod borrow;
mod config_change;
mod deactive_did;
mod deactivate_did;
mod send;
mod update_did_doc;

Expand All @@ -19,7 +19,7 @@ use crate::rebased::transaction::ProtoTransaction;
use async_trait::async_trait;
pub use borrow::*;
pub use config_change::*;
pub use deactive_did::*;
pub use deactivate_did::*;
use iota_sdk::rpc_types::IotaExecutionStatus;
use iota_sdk::rpc_types::IotaObjectData;
use iota_sdk::rpc_types::IotaObjectDataOptions;
Expand Down
3 changes: 1 addition & 2 deletions identity_storage/src/storage/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ pub enum JwkStorageDocumentError {
/// Caused by an invalid JWP algorithm.
#[error("invalid JWP algorithm")]
InvalidJwpAlgorithm,
/// Cannot cunstruct a valid Jwp (issued or presented form)
/// Cannot construct a valid Jwp (issued or presented form)
#[error("Not able to construct a valid Jwp")]
JwpBuildingError,
/// Credential's proof update internal error
#[error("Credential's proof internal error")]
ProofUpdateError(String),

/// Caused by a failure to construct a verification method.
#[error("method generation failed: unable to create a valid verification method")]
VerificationMethodConstructionError(#[source] identity_verification::Error),
Expand Down