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
|
return extension.runtime.getManifest().version
|
||||||
}
|
}
|
||||||
|
|
||||||
getPlatformInfo () {
|
getPlatformInfo (cb) {
|
||||||
return extension.runtime.getPlatformInfo()
|
return extension.runtime.getPlatformInfo(cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,9 @@ ConfigScreen.prototype.render = function () {
|
|||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
},
|
},
|
||||||
onClick (event) {
|
onClick (event) {
|
||||||
exportAsFile('MetaMask State Logs', window.logState())
|
window.logState((result) => {
|
||||||
|
exportAsFile('MetaMask State Logs', result)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}, 'Download State Logs'),
|
}, 'Download State Logs'),
|
||||||
]),
|
]),
|
||||||
|
@ -41,16 +41,17 @@ function rootReducer (state, action) {
|
|||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
|
||||||
window.logState = function () {
|
window.logState = function (cb) {
|
||||||
let state = window.METAMASK_CACHED_LOG_STATE
|
let state = window.METAMASK_CACHED_LOG_STATE
|
||||||
const version = global.platform.getVersion()
|
const version = global.platform.getVersion()
|
||||||
const browser = window.navigator.userAgent()
|
const browser = window.navigator.userAgent
|
||||||
const platform = global.platform.getPlatformInfo()
|
return global.platform.getPlatformInfo((platform) => {
|
||||||
state.version = version
|
state.version = version
|
||||||
state.platform = platform
|
state.platform = platform
|
||||||
state.browser = browser
|
state.browser = browser
|
||||||
let stateString = JSON.stringify(state, removeSeedWords, 2)
|
let stateString = JSON.stringify(state, removeSeedWords, 2)
|
||||||
return stateString
|
return cb(stateString)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeSeedWords (key, value) {
|
function removeSeedWords (key, value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user