aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-10-05 01:55:10 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-10-05 01:55:10 +0800
commit3d80565339f02e1fa3e4bc0f8aaedbeea663a712 (patch)
tree59c544a6cb7e7a6f4a7d77398b6ed02f64d8e446
parente64c64a0492aba377db6ef2c406bdb0bd1d10469 (diff)
downloadtangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar
tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.gz
tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.bz2
tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.lz
tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.xz
tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.tar.zst
tangerine-wallet-browser-3d80565339f02e1fa3e4bc0f8aaedbeea663a712.zip
Configured for callback-required function.'
-rw-r--r--app/scripts/platforms/extension.js4
-rw-r--r--ui/app/config.js4
-rw-r--r--ui/app/reducers.js17
3 files changed, 14 insertions, 11 deletions
diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js
index 83c77a77f..5ed2fdc4f 100644
--- a/app/scripts/platforms/extension.js
+++ b/app/scripts/platforms/extension.js
@@ -17,8 +17,8 @@ class ExtensionPlatform {
return extension.runtime.getManifest().version
}
- getPlatformInfo () {
- return extension.runtime.getPlatformInfo()
+ getPlatformInfo (cb) {
+ return extension.runtime.getPlatformInfo(cb)
}
}
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) {