Skip to content

Commit 752171b

Browse files
chore: trailing closure style for compactMap
1 parent e806518 commit 752171b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Web3Core/KeystoreManager/BIP32Keystore.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,13 @@ public class BIP32Keystore: AbstractKeystore {
217217
let rootNode = HDNode(decryptedRootNode) else {
218218
throw AbstractKeystoreError.encryptionError("Failed to decrypt a keystore")
219219
}
220-
return try [UInt](0..<number).compactMap({ number in
220+
return try [UInt](0..<number).compactMap() { number in
221221
guard rootNode.depth == rootPrefix.components(separatedBy: "/").count - 1,
222222
let newNode = rootNode.derive(path: "\(number)", derivePrivateKey: true) else {
223223
throw AbstractKeystoreError.keyDerivationError
224224
}
225225
return Utilities.publicToAddress(newNode.publicKey)
226-
})
226+
}
227227
}
228228

229229
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)