Skip to content

Commit 7e71490

Browse files
committed
Only log find function errorsg
1 parent 6f0dc09 commit 7e71490

File tree

3 files changed

+72
-54
lines changed

3 files changed

+72
-54
lines changed

.travis/liquality.io.mainnet.config.js

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,43 @@ export default {
6767
hostIcon: 'https://raw.githubusercontent.com/liquality/chainabstractionlayer/master/liquality-logo.png',
6868
agents: ['https://liquality.io/swap/agent', 'https://liquality.io/swap-dev/agent'],
6969
injectScript: `
70+
function loadScript(src, callback) {
71+
var s,
72+
r,
73+
t;
74+
r = false;
75+
s = document.createElement('script');
76+
s.type = 'text/javascript';
77+
s.src = src;
78+
s.onload = s.onreadystatechange = function() {
79+
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
80+
if ( !r && (!this.readyState || this.readyState == 'complete') )
81+
{
82+
r = true;
83+
callback();
84+
}
85+
};
86+
t = document.getElementsByTagName('script')[0];
87+
t.parentNode.insertBefore(s, t);
88+
}
89+
7090
function addSentry () {
71-
(function loadScript(src, callback) {
72-
var s,
73-
r,
74-
t;
75-
r = false;
76-
s = document.createElement('script');
77-
s.type = 'text/javascript';
78-
s.src = src;
79-
s.onload = s.onreadystatechange = function() {
80-
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
81-
if ( !r && (!this.readyState || this.readyState == 'complete') )
82-
{
83-
r = true;
84-
callback();
85-
}
86-
};
87-
t = document.getElementsByTagName('script')[0];
88-
t.parentNode.insertBefore(s, t);
89-
})('https://browser.sentry-cdn.com/5.14.2/bundle.min.js', function () {
90-
var dsn = window.location.pathname.indexOf('-dev') !== -1
91-
? 'https://816ae35527f34f4fbde7165d34046382@sentry.io/4693986'
92-
: 'https://8ecc6862378646dd819d160876b47f75@sentry.io/4693923'
91+
loadScript('https://browser.sentry-cdn.com/5.18.1/bundle.min.js', function () {
92+
loadScript('https://browser.sentry-cdn.com/5.18.1/captureconsole.min.js', function () {
93+
var dsn = window.location.pathname.indexOf('-dev') !== -1
94+
? 'https://816ae35527f34f4fbde7165d34046382@sentry.io/4693986'
95+
: 'https://8ecc6862378646dd819d160876b47f75@sentry.io/4693923'
9396
94-
Sentry.init({
95-
dsn: dsn,
96-
release: '${footerVersion}'
97-
})
97+
Sentry.init({
98+
dsn: dsn,
99+
integrations: [
100+
new Sentry.Integration.CaptureConsole({
101+
levels: ['error']
102+
})
103+
],
104+
release: '${footerVersion}'
105+
})
106+
});
98107
});
99108
}
100109

.travis/liquality.io.testnet.config.js

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -55,34 +55,43 @@ export default {
5555
hostIcon: 'https://raw.githubusercontent.com/liquality/chainabstractionlayer/master/liquality-logo.png',
5656
agents: ['https://liquality.io/swap-testnet-dev/agent', 'https://liquality.io/swap-testnet/agent'],
5757
injectScript: `
58+
function loadScript(src, callback) {
59+
var s,
60+
r,
61+
t;
62+
r = false;
63+
s = document.createElement('script');
64+
s.type = 'text/javascript';
65+
s.src = src;
66+
s.onload = s.onreadystatechange = function() {
67+
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
68+
if ( !r && (!this.readyState || this.readyState == 'complete') )
69+
{
70+
r = true;
71+
callback();
72+
}
73+
};
74+
t = document.getElementsByTagName('script')[0];
75+
t.parentNode.insertBefore(s, t);
76+
}
77+
5878
function addSentry () {
59-
(function loadScript(src, callback) {
60-
var s,
61-
r,
62-
t;
63-
r = false;
64-
s = document.createElement('script');
65-
s.type = 'text/javascript';
66-
s.src = src;
67-
s.onload = s.onreadystatechange = function() {
68-
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
69-
if ( !r && (!this.readyState || this.readyState == 'complete') )
70-
{
71-
r = true;
72-
callback();
73-
}
74-
};
75-
t = document.getElementsByTagName('script')[0];
76-
t.parentNode.insertBefore(s, t);
77-
})('https://browser.sentry-cdn.com/5.14.2/bundle.min.js', function () {
78-
var dsn = window.location.pathname.indexOf('-dev') !== -1
79-
? 'https://47837321894a4befa9211cf8754587dc@sentry.io/4694007'
80-
: 'https://d9929a726dba4e929d6fded47f4b3fb4@sentry.io/4693957'
81-
82-
Sentry.init({
83-
dsn: dsn,
84-
release: '${footerVersion}'
85-
})
79+
loadScript('https://browser.sentry-cdn.com/5.18.1/bundle.min.js', function () {
80+
loadScript('https://browser.sentry-cdn.com/5.18.1/captureconsole.min.js', function () {
81+
var dsn = window.location.pathname.indexOf('-dev') !== -1
82+
? 'https://47837321894a4befa9211cf8754587dc@sentry.io/4694007'
83+
: 'https://d9929a726dba4e929d6fded47f4b3fb4@sentry.io/4693957'
84+
85+
Sentry.init({
86+
dsn: dsn,
87+
integrations: [
88+
new Sentry.Integrations.CaptureConsole({
89+
levels: ['error']
90+
})
91+
],
92+
release: '${footerVersion}'
93+
})
94+
});
8695
});
8796
}
8897

src/actions/sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function catchSwapCallError (func, dispatch) {
2626
const result = await func()
2727
return result
2828
} catch (e) {
29-
dispatch(errorActions.setError(e))
29+
console.error(e)
3030
}
3131
}
3232

0 commit comments

Comments
 (0)