aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/reducers.js')
-rw-r--r--ui/app/reducers.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/ui/app/reducers.js b/ui/app/reducers.js
index 6a2f44534..3d0a58f81 100644
--- a/ui/app/reducers.js
+++ b/ui/app/reducers.js
@@ -41,12 +41,26 @@ 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((err, platform) => {
+ if (err) {
+ return cb(err)
+ }
+ state.version = version
+ state.platform = platform
+ state.browser = browser
+ let stateString = JSON.stringify(state, removeSeedWords, 2)
+ return cb(null, stateString)
+ })
+}
+
+window.logState = function () {
+ return window.logStateString((result) => {
+ console.log(result)
+ })
}
function removeSeedWords (key, value) {