Comments (5)
update: It shouldnt matter in relation to connecting, only disconnecting.
from core.
another update: there is currently a bug where if you call revokePermissions while there is a pending confirmation, the confirmation is not cleared.
This applies when either queueing is enabled or disabled.
from core.
Todo:
- if a dapp disconnects, but theres requests from several dapps, when the queueing is turned off it will clear all requests (not just the ones for the currently focused dapp)
- with queuing on, it will clear only the requests for the dapp who was disconnected
from core.
Questions:
- how should we trigger the flushing / clearing of pending confirms? Should we listen to changes on permissionController, or directly call a method/helper from inside the revokePermissions handler? -> the stateChange event should do the trick, but I really think we should be cautious of using patches for this one.
- When a dapp disconnects, aka the permissions are removed for the dapp, are we currently unsetting / deleting the value stored for the domain in the selectedNetworkController? This would cause SelectedNetworkController:stateChange to fire, which is currently handled in QueuedRequestController as a means of deciding when to flush the queue. Its possible that we just need to appropriately handle the patch for the network selection removal (or better yet, check in the selectedNEtworkController state to see if theres any network selection). In addition, we could also handle clearing the non-queued requests in this same handler (basically just copy/call this code)
from core.
When a dapp disconnects, aka the permissions are removed for the dapp, are we currently unsetting / deleting the value stored for the domain in the selectedNetworkController?
yes we are here:
from core.
Related Issues (20)
- Clarify expecations for when teams should release and update packages
- [network-controller] Prevent inconsistent state during switch
- Create proposal for a MetaMask Wallet Framework
- In case of errors Project Name is not displayed.
- feat: add importTime to the accounts controller metadata HOT 2
- improvement: SelectedNetworkController emit event for when a domains network is updated
- KeyringController addAccounts retrieves all addresses instead of only hd addresses
- PermissionController: Add caveat merging and "incremental" permission requests
- Remove providerConfig from NetworkController
- Token Rates request rate higher than expected HOT 3
- Incorporate Infura networks into `networkConfigurations` HOT 3
- PhishingDetection Controller generating requests to API with invalid value
- [keyring-controller] Provide a safe way to interact with keyring instances HOT 1
- [phishing-controller] Change update intervals
- [composable-controller] Implement type validation of constructor options HOT 4
- Migrate API usage from *.metafi and *.metaswap subdomains to *.api.cx.metamask.io
- Rename approved permission request `data` property
- Document how side effects works in `ARCHITECTURE.md`
- [phishing-controller] Use new config endpoint for default update intervals
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.