-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add onError callback and log to sentry
- Loading branch information
1 parent
7bd44e9
commit 0fb0fae
Showing
14 changed files
with
201 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.sentryclirc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import Sentry | ||
import SwiftUI | ||
import Web3Modal | ||
|
||
import WalletConnectSign | ||
import Web3Modal | ||
|
||
#if DEBUG | ||
import Atlantis | ||
|
@@ -9,21 +11,31 @@ import Atlantis | |
@main | ||
struct ExampleApp: App { | ||
init() { | ||
|
||
#if DEBUG | ||
Atlantis.start() | ||
#endif | ||
|
||
let projectId = Secrets.load().projectID | ||
|
||
// We're tracking Crash Reports / Issues from the Demo App to keep improving the SDK | ||
SentrySDK.start { options in | ||
options.dsn = "https://[email protected]/4506394479099904" | ||
options.debug = false | ||
options.enableTracing = true | ||
} | ||
|
||
SentrySDK.configureScope { scope in | ||
scope.setContext(value: ["projectId": projectId], key: "Project") | ||
} | ||
|
||
let metadata = AppMetadata( | ||
name: "Web3Modal Swift Dapp", | ||
description: "Web3Modal DApp sample", | ||
url: "wallet.connect", | ||
icons: ["https://avatars.githubusercontent.com/u/37784886"], | ||
redirect: .init(native: "w3mdapp://", universal: nil) | ||
) | ||
|
||
let projectId = Secrets.load().projectID | ||
|
||
|
||
Networking.configure( | ||
projectId: projectId, | ||
socketFactory: WalletConnectSocketClientFactory() | ||
|
@@ -32,7 +44,9 @@ struct ExampleApp: App { | |
Web3Modal.configure( | ||
projectId: projectId, | ||
metadata: metadata | ||
) | ||
) { error in | ||
SentrySDK.capture(error: error) | ||
} | ||
} | ||
|
||
var body: some Scene { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"configurations" : [ | ||
{ | ||
"id" : "829C9690-2201-4591-80FD-185F8D8FD18F", | ||
"name" : "Test Scheme Action", | ||
"options" : { | ||
|
||
} | ||
} | ||
], | ||
"defaultOptions" : { | ||
"codeCoverage" : { | ||
"targets" : [ | ||
{ | ||
"containerPath" : "container:", | ||
"identifier" : "Web3Modal", | ||
"name" : "Web3Modal" | ||
}, | ||
{ | ||
"containerPath" : "container:", | ||
"identifier" : "Web3ModalUI", | ||
"name" : "Web3ModalUI" | ||
} | ||
] | ||
} | ||
}, | ||
"testTargets" : [ | ||
{ | ||
"target" : { | ||
"containerPath" : "container:", | ||
"identifier" : "Web3ModalTests", | ||
"name" : "Web3ModalTests" | ||
} | ||
}, | ||
{ | ||
"target" : { | ||
"containerPath" : "container:", | ||
"identifier" : "Web3ModalUITests", | ||
"name" : "Web3ModalUITests" | ||
} | ||
} | ||
], | ||
"version" : 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.