Skip to content

Commit 9e9e48d

Browse files
committed
- closure style updated
- pathAppendix declaration place changed
1 parent f30bd0e commit 9e9e48d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/Web3Core/KeystoreManager/BIP32Keystore.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,9 @@ public class BIP32Keystore: AbstractKeystore {
230230
return []
231231
}
232232
let prefixPath = self.rootPrefix
233-
var pathAppendix: String?
234233

235-
return [Int](0..<number).compactMap({ number in
236-
pathAppendix = nil
234+
return [Int](0..<number).compactMap { number in
235+
var pathAppendix: String?
237236
let path = prefixPath + "/\(number)"
238237
if path.hasPrefix(prefixPath) {
239238
let upperIndex = (path.range(of: prefixPath)?.upperBound)!
@@ -261,7 +260,7 @@ public class BIP32Keystore: AbstractKeystore {
261260
return nil
262261
}
263262
return newAddress
264-
})
263+
}
265264
}
266265

267266
fileprivate func encryptDataToStorage(_ password: String, data: Data, dkLen: Int = 32, N: Int = 4096, R: Int = 6, P: Int = 1, aesMode: String = "aes-128-cbc") throws {

0 commit comments

Comments
 (0)