From cb28ec2c4f932aaf0667057ee08e74fefc89669d Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:47:01 +0100 Subject: [PATCH] chore(dpp): fix some linter warn to trigger ci --- .../v0/v0_methods.rs | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs index e04e061f67..cf376b9b83 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs @@ -52,21 +52,18 @@ impl IdentityCreditTransferTransitionMethodsV0 for IdentityCreditTransferTransit ); } } - None => { - let key = identity - .get_first_public_key_matching( - Purpose::TRANSFER, - SecurityLevel::full_range().into(), - KeyType::all_key_types().into(), - true, + None => identity + .get_first_public_key_matching( + Purpose::TRANSFER, + SecurityLevel::full_range().into(), + KeyType::all_key_types().into(), + true, + ) + .ok_or_else(|| { + ProtocolError::DesiredKeyWithTypePurposeSecurityLevelMissing( + "no transfer public key".to_string(), ) - .ok_or_else(|| { - ProtocolError::DesiredKeyWithTypePurposeSecurityLevelMissing( - "no transfer public key".to_string(), - ) - })?; - key - } + })?, }; transition.sign_external(