@@ -23,7 +23,6 @@ import createRuntimeChecks from './runtime-checks.js'
23
23
import { createContextMenus , findValueForContext , contextMenuCopyAddressAtPublicGw , contextMenuCopyRawCid , contextMenuCopyCanonicalAddress , contextMenuViewOnGateway , contextMenuCopyPermalink , contextMenuCopyCidAddress } from './context-menus.js'
24
24
import { registerSubdomainProxy } from './http-proxy.js'
25
25
import { runPendingOnInstallTasks } from './on-installed.js'
26
- import { handleConsentFromState , startSession , endSession , trackView } from './telemetry.js'
27
26
const log = debug ( 'ipfs-companion:main' )
28
27
log . error = debug ( 'ipfs-companion:main:error' )
29
28
@@ -57,11 +56,8 @@ export default async function init () {
57
56
runtime = await createRuntimeChecks ( browser )
58
57
state = initState ( options )
59
58
notify = createNotifier ( getState )
60
- // ensure consent is set properly on app init
61
- handleConsentFromState ( state )
62
59
63
60
if ( state . active ) {
64
- startSession ( )
65
61
// It's ok for this to fail, node might be unavailable or mis-configured
66
62
try {
67
63
ipfs = await initIpfsClient ( browser , state )
@@ -172,16 +168,6 @@ export default async function init () {
172
168
const result = validIpfsOrIpns ( path ) ? resolveToPublicUrl ( path ) : null
173
169
return Promise . resolve ( { pubGwUrlForIpfsOrIpnsPath : result } )
174
170
}
175
- if ( request . telemetry ) {
176
- return Promise . resolve ( onTelemetryMessage ( request . telemetry , sender ) )
177
- }
178
- }
179
-
180
- function onTelemetryMessage ( request , sender ) {
181
- if ( request . trackView ) {
182
- const { version } = browser . runtime . getManifest ( )
183
- return trackView ( request . trackView , { version } )
184
- }
185
171
}
186
172
187
173
// PORTS (connection-based messaging)
@@ -568,8 +554,6 @@ export default async function init () {
568
554
await registerSubdomainProxy ( getState , runtime )
569
555
shouldRestartIpfsClient = true
570
556
shouldStopIpfsClient = ! state . active
571
- // Any time the extension switches active state, start or stop the current session.
572
- state . active ? startSession ( ) : endSession ( )
573
557
break
574
558
case 'ipfsNodeType' :
575
559
if ( change . oldValue !== braveNodeType && change . newValue === braveNodeType ) {
@@ -636,8 +620,6 @@ export default async function init () {
636
620
break
637
621
}
638
622
}
639
- // ensure consent is set properly on state changes
640
- handleConsentFromState ( state )
641
623
642
624
if ( ( state . active && shouldRestartIpfsClient ) || shouldStopIpfsClient ) {
643
625
try {
0 commit comments