File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/Web3Core/KeystoreManager Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ public class BIP32Keystore: AbstractKeystore {
162162
163163 public func createNewCustomChildAccount( password: String , path: String ) throws {
164164 guard let decryptedRootNode = try getPrefixNodeData ( password) ,
165- keystoreParams != nil else {
165+ let keystoreParams else {
166166 throw AbstractKeystoreError . encryptionError ( " Failed to decrypt a keystore " )
167167 }
168168 guard let rootNode = HDNode ( decryptedRootNode) else {
@@ -203,7 +203,7 @@ public class BIP32Keystore: AbstractKeystore {
203203 guard let serializedRootNode = rootNode. serialize ( serializePublic: false ) else {
204204 throw AbstractKeystoreError . keyDerivationError
205205 }
206- try encryptDataToStorage ( password, data: serializedRootNode, aesMode: self . keystoreParams! . crypto. cipher)
206+ try encryptDataToStorage ( password, data: serializedRootNode, aesMode: keystoreParams. crypto. cipher)
207207 }
208208
209209 /// Fast generation addresses for current account
You can’t perform that action at this time.
0 commit comments