Skip to content

Commit

Permalink
api: fix candidate unregister
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Sep 16, 2024
1 parent 67bff19 commit d22e29d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions neo3/api/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,7 @@ def candidate_register(
`True` if successful. `False` otherwise.
"""
sb = vm.ScriptBuilder()
sb.emit_contract_call_with_args(
self.hash, "registerCandidate", [public_key]
).to_array()
sb.emit_contract_call_with_args(self.hash, "registerCandidate", [public_key])
return ContractMethodResult(sb.to_array(), unwrap.as_bool)

def candidate_unregister(
Expand All @@ -1082,9 +1080,7 @@ def candidate_unregister(
`True` if successful. `False` otherwise.
"""
sb = vm.ScriptBuilder()
sb.emit_contract_call_with_args(
self.hash, "registerCandidate", [public_key]
).to_array()
sb.emit_contract_call_with_args(self.hash, "unregisterCandidate", [public_key])
return ContractMethodResult(sb.to_array(), unwrap.as_bool)

def candidate_vote(
Expand Down

0 comments on commit d22e29d

Please sign in to comment.