Skip to content

Commit 95214d9

Browse files
chore: removed pathToAddress; replaced En/Decodable with Codable
1 parent c3abf93 commit 95214d9

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

Sources/Web3Core/KeystoreManager/KeystoreParams.swift

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import Foundation
66

7-
public struct KdfParamsV3: Decodable, Encodable {
7+
public struct KdfParamsV3: Codable {
88
var salt: String
99
var dklen: Int
1010
var n: Int?
@@ -24,15 +24,15 @@ public struct KdfParamsV3: Decodable, Encodable {
2424
}
2525
}
2626

27-
public struct CipherParamsV3: Decodable, Encodable {
27+
public struct CipherParamsV3: Codable {
2828
var iv: String
2929

3030
public init(iv: String) {
3131
self.iv = iv
3232
}
3333
}
3434

35-
public struct CryptoParamsV3: Decodable, Encodable {
35+
public struct CryptoParamsV3: Codable {
3636
var ciphertext: String
3737
var cipher: String
3838
var cipherparams: CipherParamsV3
@@ -75,20 +75,6 @@ public struct KeystoreParamsBIP32: AbstractKeystoreParams {
7575
public var version: Int
7676
public var isHDWallet: Bool
7777

78-
@available(*, deprecated, message: "Please use pathAddressPairs instead")
79-
var pathToAddress: [String: String] {
80-
get {
81-
return self.pathAddressPairs.reduce(into: [String: String]()) {
82-
$0[$1.path] = $1.address
83-
}
84-
}
85-
set {
86-
for pair in newValue {
87-
self.pathAddressPairs.append(PathAddressPair(path: pair.0, address: pair.1))
88-
}
89-
}
90-
}
91-
9278
public var pathAddressPairs: [PathAddressPair]
9379
var rootPath: String?
9480

0 commit comments

Comments
 (0)