Skip to content
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

Possible to generate address on Trezor after disconnecting #1583

Open
Canialon opened this issue Dec 21, 2022 · 6 comments
Open

Possible to generate address on Trezor after disconnecting #1583

Canialon opened this issue Dec 21, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Canialon
Copy link

Canialon commented Dec 21, 2022

Faced with the problem that it is possible to use Trezor even after disconnecting the physical device.

  1. connect you Trezor
  2. activate any coin
  3. unplug Trezor device
  4. try to generate a new address

Actual result:
Users can generate as many addresses as user wants without a connected Trezor device. It doesn't seem right. And haven’t found anything strange in the logs.

It seems that after disconnecting the device, the user should lose any access to his data and the ability to use them (including address generation). In this case, the user will be sure of the safety of his assets and trust as more at least.
It is also possible that address generation should not be left unchecked. It would be nice to ask for confirmation on the Trezor device screen if the user really wants to generate an address. This will solve the problem above

UPD:
so yes there are two topics:

  1. confirm generating new address on the Trezor device
  2. block access to your wallet if Trezor device was unplugged
@sergeyboyko0791
Copy link

Thanks for the issue!

We can ask the user to confirm the new address. Then if the Trezor device is disconnected, we'll return an error.

Users can generate as many addresses as user wants without a connected Trezor device.

This is the topic for discussion. The first (and probably the only one) way how to implement this is to notify the GUI that the device is disconnected. GUI in its turn should disable all coins activated with this Trezor.
@yurii-khi what do you think?

It seems that after disconnecting the device, the user should lose any access to his data and the ability to use them (including address generation). In this case, the user will be sure of the safety of his assets and trust as more at least.

@sergeyboyko0791 sergeyboyko0791 self-assigned this Dec 21, 2022
@sergeyboyko0791 sergeyboyko0791 added the enhancement New feature or request label Dec 21, 2022
@yurii-khi
Copy link

We can ask the user to confirm the new address. Then if the Trezor device is disconnected, we'll return an error.

Users can generate as many addresses as user wants without a connected Trezor device.

This is the topic for discussion. The first (and probably the only one) way how to implement this is to notify the GUI that the device is disconnected. GUI in its turn should disable all coins activated with this Trezor. @yurii-khi what do you think?

If by 'We can ask the user to confirm the new address' you mean 'confirm on trezor device' then I totally agree. It will also resolve second problem. One can not simply confirm address on device, if device was disconnected )
But if, for some reason, it's impossible to confirm new address on trezor, we could consider blocking UI with some sort of modal when unplug trezor (and making app completely unusable), or switching to no-login-mode. Not sure if it is an expected app behavior though, @DeckerSU what do you think from HW user perspective?

@sergeyboyko0791
Copy link

Yes, Trezor provides such functionality.

If by 'We can ask the user to confirm the new address' you mean 'confirm on trezor device' then I totally agree

This is how Trezor suite actually works: if the device is unplugged, the GUI forgets everything and asks the user to connect the device again.

we could consider blocking UI with some sort of modal when unplug trezor (and making app completely unusable), or switching to no-login-mode.

@sergeyboyko0791
Copy link

@sergeyboyko0791
Copy link

sergeyboyko0791 commented Jan 24, 2023

Referencing to the task::enable_utxo::init request https://github.com/KomodoPlatform/WebDEX/issues/502#issuecomment-1194088107:

// If the actual number of addresses is less than this value,
// we will generate up to `min_addresses_number` new addresses.
"min_addresses_number": 3,

we generate up to min_addresses_number empty addresses on the first coin initialization. Do we need to ask the user to confirm the new addresses on his Trezor device?
Please note that we generate new addresses if only the Trezor is connected (because we request Trezor::get_public_key to initialize the coin).
@yurii-khi @tonymorony @DeckerSU

@yurii-khi
Copy link

Referencing to the task::enable_utxo::init request KomodoPlatform/WebDEX#502 (comment):

// If the actual number of addresses is less than this value,
// we will generate up to `min_addresses_number` new addresses.
"min_addresses_number": 3,

we generate up to min_addresses_number empty addresses on the first coin initialization. Do we need to ask the user to confirm the new addresses on his Trezor device? Please note that we generate new addresses if only the Trezor is connected (because we request Trezor::get_public_key to initialize the coin). @yurii-khi @tonymorony @DeckerSU

We could mimic Trezor Suite behavior. Not sure, if it's possible to implement, but from user perspective it looks like this: if I have balances on some addresses - I can see those addresses from the start, otherwise - only one, first address. If I want to add more - I must confirm on device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants