name conflict
This commit is contained in:
parent
f8c1790558
commit
5b28e77ab5
1 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ from torba.hash import double_sha256, aes_encrypt, aes_decrypt
|
||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from torba import baseledger
|
from torba import baseledger
|
||||||
from torba import wallet
|
from torba import wallet as basewallet
|
||||||
|
|
||||||
|
|
||||||
class AddressManager:
|
class AddressManager:
|
||||||
|
@ -196,7 +196,7 @@ class BaseAccount:
|
||||||
HierarchicalDeterministic.name: HierarchicalDeterministic,
|
HierarchicalDeterministic.name: HierarchicalDeterministic,
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, ledger: 'baseledger.BaseLedger', wallet: 'wallet.Wallet', name: str,
|
def __init__(self, ledger: 'baseledger.BaseLedger', wallet: 'basewallet.Wallet', name: str,
|
||||||
seed: str, encrypted: bool, private_key: PrivateKey, public_key: PubKey,
|
seed: str, encrypted: bool, private_key: PrivateKey, public_key: PubKey,
|
||||||
address_generator: dict) -> None:
|
address_generator: dict) -> None:
|
||||||
self.ledger = ledger
|
self.ledger = ledger
|
||||||
|
@ -214,7 +214,7 @@ class BaseAccount:
|
||||||
wallet.add_account(self)
|
wallet.add_account(self)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def generate(cls, ledger: 'baseledger.BaseLedger', wallet: 'wallet.Wallet',
|
def generate(cls, ledger: 'baseledger.BaseLedger', wallet: 'basewallet.Wallet',
|
||||||
name: str = None, address_generator: dict = None):
|
name: str = None, address_generator: dict = None):
|
||||||
return cls.from_dict(ledger, wallet, {
|
return cls.from_dict(ledger, wallet, {
|
||||||
'name': name,
|
'name': name,
|
||||||
|
@ -229,7 +229,7 @@ class BaseAccount:
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, ledger: 'baseledger.BaseLedger', wallet: 'wallet.Wallet', d: dict):
|
def from_dict(cls, ledger: 'baseledger.BaseLedger', wallet: 'basewallet.Wallet', d: dict):
|
||||||
seed = d.get('seed', '')
|
seed = d.get('seed', '')
|
||||||
private_key = d.get('private_key', '')
|
private_key = d.get('private_key', '')
|
||||||
public_key = None
|
public_key = None
|
||||||
|
|
Loading…
Reference in a new issue