Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove sa-sdk-javascript and sentry lib[OPS-2089,R2D2-10035] #56

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"@polkadot/types": "^4.2.1",
"@polkadot/util": "^6.0.5",
"@polkadot/util-crypto": "^6.0.5",
"@sentry/electron": "^2.4.0",
"body-parser": "^1.19.0",
"copy-to-clipboard": "^3.3.1",
"cors": "^2.8.5",
Expand All @@ -123,7 +122,6 @@
"lodash": "^4.17.21",
"lodash-id": "^0.14.0",
"ref-napi": "^3.0.2",
"sa-sdk-javascript": "^1.16.6",
"sa-sdk-node": "^1.2.3",
"vue": "^2.6.12",
"vue-cookies": "^1.7.4",
Expand All @@ -142,7 +140,6 @@
"@babel/register": "^7.13.8",
"@babel/runtime": "^7.13.10",
"@polkadot/api-cli": "^0.30.1",
"@sentry/cli": "^1.63.1",
"@vue/devtools": "^6.0.0-beta.6",
"ajv": "^7.2.1",
"babel-eslint": "^10.1.0",
Expand Down
105 changes: 0 additions & 105 deletions sentry-symbols.js

This file was deleted.

6 changes: 0 additions & 6 deletions sentry.properties

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import {
} from 'electron'
// 自动更新相关
import { autoUpdater } from 'electron-updater'
// 崩溃报告
import * as Sentry from '@sentry/electron'
// import ImKeyProvider from '@imkey/web3-provider'
// test.json
import pkg from '../../package.json'
Expand Down Expand Up @@ -406,21 +404,6 @@ function autoUpdate () {
* 崩溃报告
*/
function crashReport () {
// 报告常规错误
Sentry.init({
dsn:
'https://36dc1ad5111d44e1ae447e324a4d0141@o359184.ingest.sentry.io/5199393'
})

// 报告系统错误
crashReporter.start({
companyName: 'imKey',
productName: 'imKeyDesktop',
ignoreSystemCrashHandler: true,
submitURL:
'https://o359184.ingest.sentry.io/api/5199393/security/?sentry_key=36dc1ad5111d44e1ae447e324a4d0141'
})

// 渲染进程崩溃事件
mainWindow.webContents.on('crashed', () => {
const options = {
Expand Down
34 changes: 0 additions & 34 deletions src/renderer/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Vue from 'vue'
import sa from 'sa-sdk-javascript'
import App from './App.vue'
import router from './router'
import store from './store'
Expand All @@ -15,35 +14,6 @@ const { ipcRenderer } = require('electron') // Renderer process modules
// const scaleFactor = screen.getPrimaryDisplay().scaleFactor
// const zoomFactor = (window.innerHeight / devInnerHeight) * (window.devicePixelRatio / devDevicePixelRatio) * (devScaleFactor / scaleFactor)
// ipcRenderer.send('zoomIn', zoomFactor)
// 神策埋点
Vue.prototype.$sa = sa
sa.init({
server_url: 'https://imtoken.datasink.sensorsdata.cn/sa?project=production&token=27d69b3e7fd25949', // 替换成自己的神策地址
heatmap: {
// 是否开启点击图,默认 default 表示开启,自动采集 $WebClick 事件,可以设置 'not_collect' 表示关闭
clickmap: 'not_collect',
show_log: true, // 打印console,自己配置,可以看到自己是否踩点成功,以及
// 是否开启触达注意力图,默认 default 表示开启,自动采集 $WebStay 事件,可以设置 'not_collect' 表示关闭
scroll_notice_map: 'not_collect'
}
})
sa.login('imkey-manager')
// sa.track("im_app$start",{name:"appStart",DataType:"NUMBER",data:0})
let callbackCache
Vue.prototype.$ipcRenderer = {
send: (msgType, msgData) => {
ipcRenderer.send('message-from-renderer', {
type: msgType,
data: msgData
})
},
on: (type, callback) => {
callbackCache = {
type,
callback
}
}
}
ipcRenderer.on('message-to-renderer', (sender, msg) => {
if (callbackCache.type === msg.type) {
callbackCache.callback(msg.data)
Expand Down Expand Up @@ -136,8 +106,4 @@ router.beforeEach(function (to, from, next) {
toName = 'im_manage'
}
}
ipcRenderer.send('openBrowserView', 'url', true)
if (eventName !== '' && toName !== '') {
sa.track(eventName, { to: toName }) // after the next(); statement
}
})
5 changes: 0 additions & 5 deletions src/renderer/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ const routes = [
path: 'setting',
name: 'setting',
component: require('@/views/setting').default
},
{
path: 'dapp',
name: 'dapp',
component: require('@/views/dapp').default
}
]
}
Expand Down
Loading