diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-10-05 01:55:10 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-10-05 01:55:10 +0800 |
commit | 3d80565339f02e1fa3e4bc0f8aaedbeea663a712 (patch) | |
tree | 59c544a6cb7e7a6f4a7d77398b6ed02f64d8e446 /ui | |
parent | e64c64a0492aba377db6ef2c406bdb0bd1d10469 (diff) | |
download | tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.gz tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.zst tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.zip |
Configured for callback-required function.'
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/config.js | 4 | ||||
-rw-r--r-- | ui/app/reducers.js | 17 |
2 files changed, 12 insertions, 9 deletions
diff --git a/ui/app/config.js b/ui/app/config.js index 0fe232c07..9ba00b3dd 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.logState((result) => { + exportAsFile('MetaMask State Logs', result) + }) }, }, 'Download State Logs'), ]), diff --git a/ui/app/reducers.js b/ui/app/reducers.js index 1224b4e92..385cafdfa 100644 --- a/ui/app/reducers.js +++ b/ui/app/reducers.js @@ -41,16 +41,17 @@ function rootReducer (state, action) { return state } -window.logState = function () { +window.logState = function (cb) { let state = window.METAMASK_CACHED_LOG_STATE const version = global.platform.getVersion() - const browser = window.navigator.userAgent() - const platform = global.platform.getPlatformInfo() - state.version = version - state.platform = platform - state.browser = browser - 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) + }) } function removeSeedWords (key, value) { |