aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/platforms/extension.js4
-rw-r--r--ui/app/config.js4
-rw-r--r--ui/app/reducers.js19
3 files changed, 22 insertions, 5 deletions
diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js
index 0afe04b74..5ed2fdc4f 100644
--- a/app/scripts/platforms/extension.js
+++ b/app/scripts/platforms/extension.js
@@ -17,6 +17,10 @@ class ExtensionPlatform {
return extension.runtime.getManifest().version
}
+ getPlatformInfo (cb) {
+ return extension.runtime.getPlatformInfo(cb)
+ }
+
}
module.exports = ExtensionPlatform
diff --git a/ui/app/config.js b/ui/app/config.js
index 0fe232c07..75c3bcf13 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -113,7 +113,9 @@ ConfigScreen.prototype.render = function () {
alignSelf: 'center',
},
onClick (event) {
- exportAsFile('MetaMask State Logs', window.logState())
+ window.logStateString((result) => {
+ exportAsFile('MetaMask State Logs', result)
+ })
},
}, 'Download State Logs'),
]),
diff --git a/ui/app/reducers.js b/ui/app/reducers.js
index 6a2f44534..0af7ee81c 100644
--- a/ui/app/reducers.js
+++ b/ui/app/reducers.js
@@ -41,12 +41,23 @@ function rootReducer (state, action) {
return state
}
-window.logState = function () {
+window.logStateString = function (cb) {
let state = window.METAMASK_CACHED_LOG_STATE
const version = global.platform.getVersion()
- state.version = version
- let stateString = JSON.stringify(state, removeSeedWords, 2)
- return stateString
+ const browser = window.navigator.userAgent
+ return global.platform.getPlatformInfo((platform) => {
+ state.version = version
+ state.platform = platform
+ state.browser = browser
+ let stateString = JSON.stringify(state, removeSeedWords, 2)
+ return cb(stateString)
+ })
+}
+
+window.logState = function () {
+ return window.logStateString((result) => {
+ console.log(result)
+ })
}
function removeSeedWords (key, value) {