@@ -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
0 commit comments