mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
2845398c3d
* Ensure home screen does not render if there are unapproved txs (#6501) * Ensure that the confirm screen renders before the home screen if there are unapproved txs. * Only render confirm screen before home screen on mount. * inpage - revert _metamask api to isEnabled isApproved isUnlocked
17 lines
323 B
JavaScript
17 lines
323 B
JavaScript
module.exports = createDnodeRemoteGetter
|
|
|
|
function createDnodeRemoteGetter (dnode) {
|
|
let remote
|
|
|
|
dnode.once('remote', (_remote) => {
|
|
remote = _remote
|
|
})
|
|
|
|
async function getRemote () {
|
|
if (remote) return remote
|
|
return await new Promise(resolve => dnode.once('remote', resolve))
|
|
}
|
|
|
|
return getRemote
|
|
}
|