Add a transfer capability and implante it in bp and boobank
Make a transfer in boobank like that: >transfer fromaccountid toaccoundid amount Signed-off-by: Nicolas Duhamel <nicolas@jombi.fr> Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
parent
06cbda9d4d
commit
81706f23ad
4 changed files with 59 additions and 1 deletions
|
|
@ -29,6 +29,9 @@ __all__ = ['Account', 'AccountNotFound', 'ICapBank', 'Operation']
|
|||
|
||||
class AccountNotFound(Exception):
|
||||
pass
|
||||
|
||||
class NotEnoughMoney(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class Account(CapBaseObject):
|
||||
|
|
@ -100,3 +103,6 @@ class ICapBank(IBaseCap):
|
|||
|
||||
def iter_history(self, id):
|
||||
raise NotImplementedError()
|
||||
|
||||
def transfer(self, id_from, id_to, amount):
|
||||
raise NotImplementedError()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue