mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-26 17:48:50 +00:00
Added logs for desktop app
This commit is contained in:
parent
774b45344a
commit
4567e07d70
@ -2,11 +2,21 @@
|
||||
// It has the same sandbox as a Chrome extension.
|
||||
|
||||
const TransportNodeHid = require("@ledgerhq/hw-transport-node-hid").default;
|
||||
const log = require('electron-log');
|
||||
window.TransportNodeHid = TransportNodeHid;
|
||||
|
||||
window.isDesktop = true;
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
console.error = (...args) => {
|
||||
log.error(...args)
|
||||
}
|
||||
console.warn = (...args) => {
|
||||
log.warn(...args)
|
||||
}
|
||||
console.log = (...args) => {
|
||||
log.info(...args)
|
||||
}
|
||||
const replaceText = (selector, text) => {
|
||||
const element = document.getElementById(selector)
|
||||
if (element) element.innerText = text
|
||||
|
Loading…
x
Reference in New Issue
Block a user