-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
chore(connect): move remembered device away from local variable #9790
Conversation
b6911d0
to
917fff9
Compare
592bc55
to
f258c9b
Compare
f258c9b
to
d92dfca
Compare
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
d92dfca
to
58992de
Compare
7d072d5
to
00ecc1b
Compare
00ecc1b
to
fb34b4a
Compare
fb34b4a
to
6d05b57
Compare
3d240d1
to
45c8af4
Compare
@@ -210,7 +210,20 @@ const initDevice = async (method: AbstractMethod<any>) => { | |||
const isWebUsb = _deviceList.transportType() === 'WebUsbTransport'; | |||
let device: Device | typeof undefined; | |||
let showDeviceSelection = isWebUsb; | |||
if (method.devicePath) { |
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.
check removed line 297, its related
cc @marekrjpolak because I am touching core (_preferredDevice), cc @karliatto because it relates to all kind of popup behaviours and is related to webextension |
if possible and we are sure it doesn't break anything, it would make sense to include this in 9.1.12 release. since properly worker @trezor/connect-webextension sort of depends on this imho. cc @karliatto |
/rebase |
45c8af4
to
ec8c0d9
Compare
@mroz22 For some reason remember device doesn't seem to get saved on the first try, but only the second time. Will debug more tomorrow |
tmp: run all popup test should be included or probably not? Update: removed it |
46986ad
to
abb5b23
Compare
I am still not decided whether to push this into 9.1.12 or wait for 9.1.13. leaning slightly towards 9.1.13 |
If we don't need it in the next release and you are unsure, let's wait. |
/rebase |
abb5b23
to
efb95ee
Compare
Make "remember" device work when core is loaded in popup.
Description
In #9525 we are introducing loading connect core inside popup. This has 2 effects:
Couple of changes are needed. First of them is how "remember" device works:
Device not found
error, because connect would obviously try to target a device which is not connected at all. I had to change this behaviour in 2 ways:initDevice
phase and show device selection instead.Testing
Related Issue
#9525, #9644
Screenshots:
Connecting device for the 1st time or if there is more than 1 device connected