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

chore: refactoring #3

Merged
merged 5 commits into from
Jun 30, 2023
Merged

chore: refactoring #3

merged 5 commits into from
Jun 30, 2023

Conversation

JeneaVranceanu
Copy link

  1. Simplified if-else statement (old lines 175-190);
  2. pathAppendix is set as a non-optional;
  3. Combined 2 throw AbstractKeystoreError.encryptionError("Derivation depth mismatch") into one;
  4. newPath is declared as let;
  5. Reduced CharacterSet.init to just .init.

@@ -162,53 +162,48 @@ public class BIP32Keystore: AbstractKeystore {

public func createNewCustomChildAccount(password: String, path: String) throws {
guard let decryptedRootNode = try getPrefixNodeData(password),
let keystoreParams else {
keystoreParams != nil else {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this wrong change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

throw AbstractKeystoreError.keyDerivationError
}

var newPath: String
let newPath: String
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it be working ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, absolutely.

@6od9i 6od9i merged commit e806518 into 6od9i:develop Jun 30, 2023
@JeneaVranceanu JeneaVranceanu deleted the develop-6od9i branch June 30, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants