Skip to content

Commit

Permalink
Add sentry for error logging and capturing useful information.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Goel committed Sep 16, 2024
1 parent 0aeec8b commit 2d679bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions Sources/TorusUtils/TorusUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class TorusUtils {
/// - Throws: `TorusUtilError.invalidInput`
public init(params: TorusOptions, loglevel: OSLogType = .default) throws {
SentryUtils.initSentry()
TorusUtils.clientId = params.clientId
var defaultHost = ""
if params.legacyMetadataHost == nil {
if case let .legacy(urlHost) = params.network {
Expand Down Expand Up @@ -70,8 +71,6 @@ public class TorusUtils {
enableOneKey = params.enableOneKey
legacyMetadataHost = defaultHost
signerHost = params.network.signerMap + "/api/sign"

TorusUtils.clientId = params.clientId
}

internal static func isLegacyNetworkRouteMap(network: TorusNetwork) -> Bool {
Expand Down
1 change: 0 additions & 1 deletion Sources/TorusUtils/analytics/SentryUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class SentryUtils {
}
}

// Static method to close Sentry (typically used during app termination)
static func close() {
SentrySDK.close()
}
Expand Down

0 comments on commit 2d679bb

Please sign in to comment.