4
4
from typing import Any , DefaultDict , Dict , List , Optional , Union
5
5
6
6
from graphenecommon .chain import AbstractGrapheneChain
7
- from graphenecommon .exceptions import KeyAlreadyInStoreException ,AccountDoesNotExistsException
7
+ from graphenecommon .exceptions import KeyAlreadyInStoreException , AccountDoesNotExistsException
8
8
9
9
from vizapi .noderpc import NodeRPC
10
10
from vizbase import operations
@@ -265,7 +265,7 @@ def award(
265
265
)
266
266
267
267
return self .finalizeOp (op , account , "regular" )
268
-
268
+
269
269
def fixed_award (
270
270
self ,
271
271
receiver : str ,
@@ -669,13 +669,13 @@ def create_account(
669
669
op = operations .Account_create (** op )
670
670
671
671
return self .finalizeOp (op , creator , "active" )
672
-
672
+
673
673
def update_account_profile (
674
674
self ,
675
675
account_name : str ,
676
676
memo_key : str ,
677
677
json_meta : Optional [Dict [str , Any ]] = None ,
678
- ) -> dict :
678
+ ) -> dict :
679
679
"""
680
680
Update account profile.
681
681
@@ -685,7 +685,7 @@ def update_account_profile(
685
685
686
686
:param str account_name: (**required**) new account name
687
687
:param dict json_meta: Optional meta data for the account
688
-
688
+
689
689
:raises AccountDoesNotExistsException: if the account does not exist
690
690
"""
691
691
@@ -704,19 +704,16 @@ def update_account_profile(
704
704
op = operations .Account_update (** op )
705
705
706
706
return self .finalizeOp (ops = op , account = account_name , permission = "active" )
707
-
708
- def delegate_vesting_shares (
709
- self ,
710
- delegator : str ,
711
- delegatee : str ,
712
- amount : float
713
- ) -> dict :
707
+
708
+ def delegate_vesting_shares (self , delegator : str , delegatee : str , amount : float ) -> dict :
714
709
"""
715
710
Delegate vesting SHARES to account.
716
711
717
712
:param str delegator: account that delegates
718
713
:param str delegatee: account to which is delegated
719
714
:param float amount: number of SHARES to be delegated
715
+
716
+ :raises AccountDoesNotExistsException: if the account does not exist
720
717
"""
721
718
722
719
# check if the account does not exist
@@ -729,10 +726,10 @@ def delegate_vesting_shares(
729
726
"delegator" : delegator ,
730
727
"delegatee" : delegatee ,
731
728
"vesting_shares" : "{:.{prec}f} {asset}" .format (
732
- float (amount ),
733
- prec = PRECISIONS .get (self .rpc .chain_params ["shares_symbol" ]),
734
- asset = self .rpc .chain_params ["shares_symbol" ],
735
- ),
729
+ float (amount ),
730
+ prec = PRECISIONS .get (self .rpc .chain_params ["shares_symbol" ]),
731
+ asset = self .rpc .chain_params ["shares_symbol" ],
732
+ ),
736
733
}
737
734
738
735
op = operations .Delegate_vesting_shares (** op )
0 commit comments