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 {
162
162
163
163
public func createNewCustomChildAccount( password: String , path: String ) throws {
164
164
guard let decryptedRootNode = try getPrefixNodeData ( password) ,
165
- keystoreParams != nil else {
165
+ let keystoreParams else {
166
166
throw AbstractKeystoreError . encryptionError ( " Failed to decrypt a keystore " )
167
167
}
168
168
guard let rootNode = HDNode ( decryptedRootNode) else {
@@ -203,7 +203,7 @@ public class BIP32Keystore: AbstractKeystore {
203
203
guard let serializedRootNode = rootNode. serialize ( serializePublic: false ) else {
204
204
throw AbstractKeystoreError . keyDerivationError
205
205
}
206
- try encryptDataToStorage ( password, data: serializedRootNode, aesMode: self . keystoreParams! . crypto. cipher)
206
+ try encryptDataToStorage ( password, data: serializedRootNode, aesMode: keystoreParams. crypto. cipher)
207
207
}
208
208
209
209
/// Fast generation addresses for current account
You can’t perform that action at this time.
0 commit comments