Files
xahaud/src/cpp/ripple/OrderBook.cpp
2013-03-06 03:28:31 -08:00

19 lines
516 B
C++

#include "OrderBook.h"
#include "Ledger.h"
OrderBook::OrderBook(SerializedLedgerEntry::ref ledgerEntry)
{
const STAmount saTakerGets = ledgerEntry->getFieldAmount(sfTakerGets);
const STAmount saTakerPays = ledgerEntry->getFieldAmount(sfTakerPays);
mCurrencyIn = saTakerPays.getCurrency();
mCurrencyOut = saTakerGets.getCurrency();
mIssuerIn = saTakerPays.getIssuer();
mIssuerOut = saTakerGets.getIssuer();
mBookBase=Ledger::getBookBase(mCurrencyIn, mIssuerIn, mCurrencyOut, mIssuerOut);
}
// vim:ts=4