Skip to content

Commit

Permalink
Only log find function errorsg
Browse files Browse the repository at this point in the history
  • Loading branch information
monokh committed Jun 29, 2020
1 parent 6f0dc09 commit 7e71490
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 54 deletions.
61 changes: 35 additions & 26 deletions .travis/liquality.io.mainnet.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,34 +67,43 @@ export default {
hostIcon: 'https://raw.githubusercontent.com/liquality/chainabstractionlayer/master/liquality-logo.png',
agents: ['https://liquality.io/swap/agent', 'https://liquality.io/swap-dev/agent'],
injectScript: `
function loadScript(src, callback) {
var s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = s.onreadystatechange = function() {
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
if ( !r && (!this.readyState || this.readyState == 'complete') )
{
r = true;
callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
}
function addSentry () {
(function loadScript(src, callback) {
var s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = s.onreadystatechange = function() {
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
if ( !r && (!this.readyState || this.readyState == 'complete') )
{
r = true;
callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
})('https://browser.sentry-cdn.com/5.14.2/bundle.min.js', function () {
var dsn = window.location.pathname.indexOf('-dev') !== -1
? 'https://[email protected]/4693986'
: 'https://[email protected]/4693923'
loadScript('https://browser.sentry-cdn.com/5.18.1/bundle.min.js', function () {
loadScript('https://browser.sentry-cdn.com/5.18.1/captureconsole.min.js', function () {
var dsn = window.location.pathname.indexOf('-dev') !== -1
? 'https://[email protected]/4693986'
: 'https://[email protected]/4693923'
Sentry.init({
dsn: dsn,
release: '${footerVersion}'
})
Sentry.init({
dsn: dsn,
integrations: [
new Sentry.Integration.CaptureConsole({
levels: ['error']
})
],
release: '${footerVersion}'
})
});
});
}
Expand Down
63 changes: 36 additions & 27 deletions .travis/liquality.io.testnet.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,43 @@ export default {
hostIcon: 'https://raw.githubusercontent.com/liquality/chainabstractionlayer/master/liquality-logo.png',
agents: ['https://liquality.io/swap-testnet-dev/agent', 'https://liquality.io/swap-testnet/agent'],
injectScript: `
function loadScript(src, callback) {
var s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = s.onreadystatechange = function() {
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
if ( !r && (!this.readyState || this.readyState == 'complete') )
{
r = true;
callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
}
function addSentry () {
(function loadScript(src, callback) {
var s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = s.onreadystatechange = function() {
//console.log( this.readyState ); //uncomment this line to see which ready states are called.
if ( !r && (!this.readyState || this.readyState == 'complete') )
{
r = true;
callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
})('https://browser.sentry-cdn.com/5.14.2/bundle.min.js', function () {
var dsn = window.location.pathname.indexOf('-dev') !== -1
? 'https://[email protected]/4694007'
: 'https://[email protected]/4693957'
Sentry.init({
dsn: dsn,
release: '${footerVersion}'
})
loadScript('https://browser.sentry-cdn.com/5.18.1/bundle.min.js', function () {
loadScript('https://browser.sentry-cdn.com/5.18.1/captureconsole.min.js', function () {
var dsn = window.location.pathname.indexOf('-dev') !== -1
? 'https://[email protected]/4694007'
: 'https://[email protected]/4693957'
Sentry.init({
dsn: dsn,
integrations: [
new Sentry.Integrations.CaptureConsole({
levels: ['error']
})
],
release: '${footerVersion}'
})
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/actions/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function catchSwapCallError (func, dispatch) {
const result = await func()
return result
} catch (e) {
dispatch(errorActions.setError(e))
console.error(e)
}
}

Expand Down

0 comments on commit 7e71490

Please sign in to comment.