Infrastructure for local transactions, wallet interface.

Transaction JSON code.
This commit is contained in:
JoelKatz
2012-01-08 22:18:03 -08:00
parent f87d1bfcb7
commit fa16bb430b
9 changed files with 145 additions and 13 deletions

17
LocalTransaction.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "LocalTransaction.h"
#include "Application.h"
#include "Wallet.h"
bool LocalTransaction::makeTransaction()
{
if(!!mTransaction) return true;
LocalAccount::pointer lac(theApp->getWallet().findAccountForTransaction(mAmount));
if(!lac) return false;
mTransaction=Transaction::pointer(new Transaction(lac, mDestAcctID, mAmount, mTag,
theApp->getOPs().getCurrentLedgerID()));
if(mTransaction->getStatus()!=NEW) return false;
return true;
}