mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Remove reload from Share Address button (#6991)
* Update tooltip words for Share Address * Don't forceReload anything on Share Address
This commit is contained in:
parent
ceace71bf5
commit
22b20837d4
@ -6,7 +6,7 @@
|
||||
"message": "Share your address to connect to $1?"
|
||||
},
|
||||
"shareAddressInfo": {
|
||||
"message": "Sharing your address with $1 will allow you to interact with this dapp. This permission is to protect your privacy by default."
|
||||
"message": "Sharing your address with $1 will allow you to interact with this dapp. This permission is to protect your privacy by default. You may need to reload the dapp for the change to take effect."
|
||||
},
|
||||
"privacyModeDefault": {
|
||||
"message": "Privacy Mode is now enabled by default"
|
||||
|
@ -114,7 +114,6 @@ function forwardTrafficBetweenMuxers (channelName, muxA, muxB) {
|
||||
|
||||
async function setupPublicApi (outStream) {
|
||||
const api = {
|
||||
forceReloadSite: (cb) => cb(null, forceReloadSite()),
|
||||
getSiteMetadata: (cb) => cb(null, getSiteMetadata()),
|
||||
}
|
||||
const dnode = Dnode(api)
|
||||
@ -307,10 +306,3 @@ async function domIsReady () {
|
||||
// wait for load
|
||||
await new Promise(resolve => window.addEventListener('DOMContentLoaded', resolve, { once: true }))
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the site
|
||||
*/
|
||||
function forceReloadSite () {
|
||||
window.location.reload()
|
||||
}
|
||||
|
@ -156,8 +156,6 @@ class ProviderApprovalController extends SafeEventEmitter {
|
||||
dismissedOrigins: _dismissedOrigins,
|
||||
providerRequests: remainingProviderRequests,
|
||||
})
|
||||
|
||||
this.emit(`forceResolvedRequest:${origin}`, { approved: true, forced: true })
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1273,8 +1273,6 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
const publicApi = this.setupPublicApi(mux.createStream('publicApi'), originDomain)
|
||||
this.setupProviderConnection(mux.createStream('provider'), originDomain, publicApi)
|
||||
this.setupPublicConfig(mux.createStream('publicConfig'), originDomain)
|
||||
|
||||
this.providerApprovalController.on(`forceResolvedRequest:${originDomain}`, publicApi.forceReloadSite)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1455,10 +1453,6 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
|
||||
const publicApi = {
|
||||
// wrap with an await remote
|
||||
forceReloadSite: async () => {
|
||||
const remote = await getRemote()
|
||||
return await pify(remote.forceReloadSite)()
|
||||
},
|
||||
getSiteMetadata: async () => {
|
||||
const remote = await getRemote()
|
||||
return await pify(remote.getSiteMetadata)()
|
||||
|
Loading…
Reference in New Issue
Block a user