File tree 1 file changed +11
-5
lines changed
src/aleph/sdk/wallets/ledger
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,24 @@ def from_address(
38
38
a known wallet address.
39
39
"""
40
40
device = device or init_dongle ()
41
- account = find_account (address = address , dongle = device , count = 5 )
42
- return LedgerETHAccount (
43
- account = account ,
44
- device = device ,
41
+ account : Optional [LedgerAccount ] = find_account (
42
+ address = address , dongle = device , count = 5
43
+ )
44
+ return (
45
+ LedgerETHAccount (
46
+ account = account ,
47
+ device = device ,
48
+ )
49
+ if account
50
+ else None
45
51
)
46
52
47
53
@staticmethod
48
54
def from_path (path : str , device : Optional [Dongle ] = None ) -> LedgerETHAccount :
49
55
"""Initialize an aleph.im account from a LedgerHQ device from
50
56
a known wallet account path."""
51
57
device = device or init_dongle ()
52
- account = get_account_by_path (path_string = path , dongle = device )
58
+ account : LedgerAccount = get_account_by_path (path_string = path , dongle = device )
53
59
return LedgerETHAccount (
54
60
account = account ,
55
61
device = device ,
You can’t perform that action at this time.
0 commit comments