-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for extension unlock before processing eth_requestAccounts #8149
Conversation
Builds ready [0b34220]
Page Load Metrics (694 ± 51 ms)
|
Builds ready [f0774b7]
Page Load Metrics (811 ± 35 ms)
|
Builds ready [f37486f]
Page Load Metrics (600 ± 50 ms)
|
11dac4a
to
6797e4d
Compare
Builds ready [6797e4d]
Page Load Metrics (642 ± 57 ms)
|
6797e4d
to
c03451f
Compare
Builds ready [c03451f]
Page Load Metrics (684 ± 49 ms)
|
Builds ready [6064c50]
Page Load Metrics (585 ± 67 ms)
|
Builds ready [597ac58]
Page Load Metrics (583 ± 37 ms)
|
597ac58
to
1eec2c2
Compare
Builds ready [1eec2c2]
Page Load Metrics (599 ± 47 ms)
|
Builds ready [8b4c19e]
Page Load Metrics (591 ± 58 ms)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we're handing keyring construction properly; i.e. we might need to emit unlocked
after the initial keyring construction, to drain anything queued up during onboarding
Builds ready [d2ae43d]
Page Load Metrics (831 ± 32 ms)
|
Builds ready [7820d6d]
Page Load Metrics (667 ± 35 ms)
|
f97d2a7
to
57759aa
Compare
Builds ready [e373bf0]
Page Load Metrics (684 ± 46 ms)
|
Builds ready [feaa634]
Page Load Metrics (649 ± 33 ms)
|
Builds ready [56433c5]
Page Load Metrics (649 ± 20 ms)
|
return error on duplicate eth_requestAccounts add getUnlockPromise mock to permissions unit tests
56433c5
to
8e29b91
Compare
Builds ready [29265b6]
Page Load Metrics (538 ± 57 ms)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Seems to work for me locally after that last Keyring Controller update
Builds ready [28bcb95]
Page Load Metrics (663 ± 25 ms)
|
Note for posterity: force-merged because a codeowner temporarily lost access to GitHub. |
Summary
unlock
event and related functionality to controllers:eth-keyring-controller
to version withunlock
eventMetamaskController
addUnlockListener
methodAppStateController
getUnlockPromise
,handleUnlock
PermissionsController
: Waits for the extension to become unlocked before attempting to processeth_requestAccounts
, if theeth_accounts
permission is already grantedresourceUnavailable
Ethereum JSON RPC error for all requests following the first while waitingeth_accounts
permission is not granted, this is handled by functionality introduced in Prevent external domains from submitting more than one perm request at once #8148Details
eth_requestAccounts
if theeth_accounts
permission is already granted