mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Configured for callback-required function.'
This commit is contained in:
parent
e64c64a049
commit
3d80565339
@ -17,8 +17,8 @@ class ExtensionPlatform {
|
||||
return extension.runtime.getManifest().version
|
||||
}
|
||||
|
||||
getPlatformInfo () {
|
||||
return extension.runtime.getPlatformInfo()
|
||||
getPlatformInfo (cb) {
|
||||
return extension.runtime.getPlatformInfo(cb)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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'),
|
||||
]),
|
||||
|
@ -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()
|
||||
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 stateString
|
||||
return cb(stateString)
|
||||
})
|
||||
}
|
||||
|
||||
function removeSeedWords (key, value) {
|
||||
|
Loading…
Reference in New Issue
Block a user