Skip to content

Commit

Permalink
[ECHOT-335] Up library patch version >> 0.1.61: update echo registrat…
Browse files Browse the repository at this point in the history
…ion method and operation

* Update echo registration method and operation

* Up library patch version >> 0.1.61
  • Loading branch information
Eugene Vasilev authored Mar 23, 2020
1 parent 74163cd commit cf2283f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion echopy/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self):
def solve_registration_task(self, block_id, rand_num, difficulty):
return solve_registration_task(block_id, rand_num, difficulty)

def register_account(self, callback, name, active, echorand):
def register_account(self, callback, name, active, echorand, evm_address=None):
if self.api.ws.connection is None:
raise AttributeError("Connection is needed: use 'connect' method for connecting to node")
task = self.api.registration.request_registration_task()
Expand All @@ -29,6 +29,7 @@ def register_account(self, callback, name, active, echorand):
name,
active,
echorand,
evm_address,
nonce,
task["rand_num"]
)
Expand Down
5 changes: 3 additions & 2 deletions echopy/echoapi/ws_api/registration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ def request_registration_task(self):
[]
)

def submit_registration_solution(self, callback, name, active, echorand_key, nonce, rand_num):
def submit_registration_solution(self, callback, name, active, echorand_key,
evm_address, nonce, rand_num):
return self.db.rpcexec(
'submit_registration_solution',
[callback, name, active, echorand_key, nonce, rand_num]
[callback, name, active, echorand_key, evm_address, nonce, rand_num]
)

def get_registrar(self):
Expand Down
2 changes: 2 additions & 0 deletions echopy/echobase/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,14 @@ def detail(self, *args, **kwargs):
# Account Management
class AccountCreate(EchoObject):
def detail(self, *args, **kwargs):
evm_address = get_optional("evm_address", kwargs, Bytes)
result = OrderedDict(
[
("registrar", ObjectId(kwargs["registrar"], "account")),
("name", String(kwargs["name"])),
("active", Permission(kwargs["active"])),
("echorand_key", PublicKey(kwargs["echorand_key"])),
("evm_address", Optional(evm_address)),
("options", AccountOptions(kwargs["options"])),
("extensions", Set([])),
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

VERSION = "0.1.60"
VERSION = "0.1.61"
packages = find_packages()
packages.remove('test')

Expand Down

0 comments on commit cf2283f

Please sign in to comment.