diff --git a/.travis/liquality.io.mainnet.config.js b/.travis/liquality.io.mainnet.config.js index 937240de..3e63b596 100644 --- a/.travis/liquality.io.mainnet.config.js +++ b/.travis/liquality.io.mainnet.config.js @@ -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://816ae35527f34f4fbde7165d34046382@sentry.io/4693986' - : 'https://8ecc6862378646dd819d160876b47f75@sentry.io/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://816ae35527f34f4fbde7165d34046382@sentry.io/4693986' + : 'https://8ecc6862378646dd819d160876b47f75@sentry.io/4693923' - Sentry.init({ - dsn: dsn, - release: '${footerVersion}' - }) + Sentry.init({ + dsn: dsn, + integrations: [ + new Sentry.Integration.CaptureConsole({ + levels: ['error'] + }) + ], + release: '${footerVersion}' + }) + }); }); } diff --git a/.travis/liquality.io.testnet.config.js b/.travis/liquality.io.testnet.config.js index ed2232b3..536d5056 100644 --- a/.travis/liquality.io.testnet.config.js +++ b/.travis/liquality.io.testnet.config.js @@ -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://47837321894a4befa9211cf8754587dc@sentry.io/4694007' - : 'https://d9929a726dba4e929d6fded47f4b3fb4@sentry.io/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://47837321894a4befa9211cf8754587dc@sentry.io/4694007' + : 'https://d9929a726dba4e929d6fded47f4b3fb4@sentry.io/4693957' + + Sentry.init({ + dsn: dsn, + integrations: [ + new Sentry.Integrations.CaptureConsole({ + levels: ['error'] + }) + ], + release: '${footerVersion}' + }) + }); }); } diff --git a/src/actions/sync.js b/src/actions/sync.js index 0824f80a..b9551b81 100644 --- a/src/actions/sync.js +++ b/src/actions/sync.js @@ -26,7 +26,7 @@ async function catchSwapCallError (func, dispatch) { const result = await func() return result } catch (e) { - dispatch(errorActions.setError(e)) + console.error(e) } }