File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
src/aleph/sdk/wallets/ledger Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,24 @@ def from_address(
3838 a known wallet address.
3939 """
4040 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
4551 )
4652
4753 @staticmethod
4854 def from_path (path : str , device : Optional [Dongle ] = None ) -> LedgerETHAccount :
4955 """Initialize an aleph.im account from a LedgerHQ device from
5056 a known wallet account path."""
5157 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 )
5359 return LedgerETHAccount (
5460 account = account ,
5561 device = device ,
You can’t perform that action at this time.
0 commit comments