poanetwork / poa-dapps-validators

DApp for a list of validators with metadata for POA Network (Core/Sokol). Validators can update metadata using DApp.
https://validators.poa.network
GNU General Public License v3.0
13 stars 41 forks source link

Call `window.ethereum.enable` only when that really needed #113

Closed varasev closed 4 years ago

varasev commented 5 years ago

Problem: For a user who has installed MetaMask and opened the Validators DApp for the first time in the current browser's session, the DApp asks permissions to get access to the list of accounts in MetaMask. But the app doesn't need to know the list of user's accounts until validator's Voting Key is really needed for some operation.

Solution: call window.ethereum.enable only when DApp requires Voting Key to take some action which supposes transaction signing (when the user goes to Set Metadata page or wants to Confirm/Finalize on Pending Changes page).

varasev commented 4 years ago

Done in https://github.com/poanetwork/poa-dapps-validators/pull/118.