Skip to content

Commit

Permalink
Update Trezor for HWI 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-kaufman committed Mar 28, 2021
1 parent cf401ca commit af783ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cryptoadvance/specter/devices/hwi/trezor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
common_err_msgs,
handle_errors,
)
from hwilib.devices.trezorlib.client import TrezorClient as Trezor
from hwilib.devices.trezorlib.client import TrezorClient as Trezor, PASSPHRASE_ON_DEVICE
from hwilib.devices.trezorlib.debuglink import TrezorClientDebugLink
from hwilib.devices.trezorlib.exceptions import Cancelled, TrezorFailure
from hwilib.devices.trezorlib.transport import (
Expand Down Expand Up @@ -258,7 +258,9 @@ def get_pin(self, code: Optional[int] = None) -> NoReturn:
def disallow_passphrase(self) -> None:
self.return_passphrase = False

def get_passphrase(self, available_on_device: bool) -> str:
def get_passphrase(self, available_on_device: bool) -> object:
if available_on_device:
return PASSPHRASE_ON_DEVICE
if self.return_passphrase:
return self.passphrase
raise ValueError("Passphrase from Host is not allowed for Trezor T")
Expand Down

0 comments on commit af783ea

Please sign in to comment.