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
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# backend.py
|
||||
#
|
||||
# Copyright 2010 nicolas <nicolas@NicolasDesktop>
|
||||
# Copyright 2010 nicolas <nicolas@jombi.fr>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -52,3 +52,15 @@ class BPBackend(BaseBackend, ICapBank):
|
|||
for history in self.browser.get_history(account):
|
||||
yield history
|
||||
|
||||
def transfer(self, id_from, id_to, amount):
|
||||
from_account = self.get_account(id_from)
|
||||
to_account = self.get_account(id_to)
|
||||
|
||||
#TODO: retourner le numero du virement
|
||||
self.browser.make_transfer(from_account, to_account, amount)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue