Skip to content

Commit

Permalink
update: further dead code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
metalurgical committed Jun 5, 2024
1 parent 7443eb5 commit fbf94d8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions Sources/TorusUtils/Helpers/MetadataUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import OSLog
#endif

internal class MetadataUtils {
public static func convertMetadataToNonce(params: [String: Any]?) -> BigUInt {
guard let params = params, let message = params["message"] as? String else {
return BigUInt(0)
}
return BigUInt(message, radix: 16)!
}

public static func decryptNodeData(eciesData: EciesHexOmitCiphertext, ciphertextHex: String, privKey: String) throws -> String {
let eciesOpts = ECIES(
iv: eciesData.iv,
Expand Down Expand Up @@ -108,10 +101,6 @@ internal class MetadataUtils {
return decoded
}

public static func getNonce(legacyMetadataHost: String, serverTimeOffset: Int, X: String, Y: String, privateKey: String? = nil, getOnly: Bool = true) async throws -> GetOrSetNonceResult {
return try await getOrSetNonce(legacyMetadataHost: legacyMetadataHost, serverTimeOffset: serverTimeOffset, X: X, Y: Y, privateKey: privateKey, getOnly: getOnly)
}

public static func getOrSetSapphireMetadataNonce(legacyMetadataHost: String, network: TorusNetwork, X: String, Y: String, serverTimeOffset: Int, privateKey: String? = nil, getOnly: Bool = false) async throws -> GetOrSetNonceResult {
if case .sapphire = network {
return try await getOrSetNonce(legacyMetadataHost: legacyMetadataHost, serverTimeOffset: serverTimeOffset, X: X, Y: Y, privateKey: privateKey, getOnly: getOnly)
Expand Down
1 change: 0 additions & 1 deletion Sources/TorusUtils/Helpers/NodeUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ internal class NodeUtils {
var request = try MetadataUtils.makeUrlRequest(url: endpoints[i])
request.httpBody = rpcdata
let val = try await URLSession(configuration: .default).data(for: request)

let decoded = try JSONDecoder().decode(JRPCResponse<ShareRequestResult>.self, from: val.0)
return decoded
} catch {
Expand Down

0 comments on commit fbf94d8

Please sign in to comment.