File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Sources/Web3Core/KeystoreManager
Tests/web3swiftTests/localTests Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,12 @@ public class BIP32Keystore: AbstractKeystore {
217217 }
218218
219219 /// Fast generation addresses for current account
220- /// used for shows wich address user wiil get when changed number of his wallet
220+ /// used for shows which address user will get when changed number of his wallet
221221 /// - Parameters:
222222 /// - password: password of seed storage
223- /// - preffixPath: preffix of Derivation Path without account number
224- /// - number: number of wallets adresses needed to generate from 0 to number-1
223+ /// - number: number of wallets addresses needed to generate from 0 to number-1
225224 /// - Returns: Array of addresses generated from 0 to number bound, or empty array in case of error
226- public func getAddressForAccount( password: String , preffixPath : String , number: Int ) -> [ EthereumAddress ] {
225+ public func getAddressForAccount( password: String , number: Int ) -> [ EthereumAddress ] {
227226 guard let decryptedRootNode = try ? getPrefixNodeData ( password) else {
228227 return [ ]
229228 }
@@ -235,7 +234,7 @@ public class BIP32Keystore: AbstractKeystore {
235234
236235 return [ Int] ( 0 ..< number) . compactMap ( { number in
237236 pathAppendix = nil
238- let path = preffixPath + " / \( number) "
237+ let path = prefixPath + " / \( number) "
239238 if path. hasPrefix ( prefixPath) {
240239 let upperIndex = ( path. range ( of: prefixPath) ? . upperBound) !
241240 if upperIndex < path. endIndex {
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ class BIP32KeystoreTests: XCTestCase {
3030 }
3131
3232 let addresses = keystore. getAddressForAccount ( password: password,
33- preffixPath: HDNode . defaultPathMetamaskPrefix,
3433 number: addressesCount)
3534 XCTAssertEqual ( addresses. count, addressesCount)
3635 XCTAssertNotEqual ( addresses [ 11 ] , addresses [ 1 ] )
You can’t perform that action at this time.
0 commit comments