From eea2739f536e4b7b90f2eb9b8dfad2fc8901b54b Mon Sep 17 00:00:00 2001 From: jed Date: Mon, 10 Dec 2012 12:05:50 -0800 Subject: [PATCH] add seq to offer json --- newcoin.vcxproj | 2 +- newcoin.vcxproj.filters | 6 +++--- src/cpp/ripple/Offer.cpp | 1 + src/cpp/ripple/Offer.h | 2 ++ src/cpp/ripple/RPCHandler.cpp | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/newcoin.vcxproj b/newcoin.vcxproj index 83c3483ef..b5839160e 100644 --- a/newcoin.vcxproj +++ b/newcoin.vcxproj @@ -125,6 +125,7 @@ + @@ -183,7 +184,6 @@ - diff --git a/newcoin.vcxproj.filters b/newcoin.vcxproj.filters index f7dfc590e..25533c2dc 100644 --- a/newcoin.vcxproj.filters +++ b/newcoin.vcxproj.filters @@ -276,9 +276,6 @@ Source Files - - Source Files - Source Files @@ -360,6 +357,9 @@ Source Files + + Source Files + diff --git a/src/cpp/ripple/Offer.cpp b/src/cpp/ripple/Offer.cpp index 0b9407b32..5fe7add9f 100644 --- a/src/cpp/ripple/Offer.cpp +++ b/src/cpp/ripple/Offer.cpp @@ -12,4 +12,5 @@ Offer::Offer(SerializedLedgerEntry::pointer ledgerEntry) : AccountItem(ledgerEnt mAccount=mLedgerEntry->getFieldAccount(sfAccount); mTakerGets = mLedgerEntry->getFieldAmount(sfTakerGets); mTakerPays = mLedgerEntry->getFieldAmount(sfTakerPays); + mSeq = mLedgerEntry->getFieldU32(sfSequence); } \ No newline at end of file diff --git a/src/cpp/ripple/Offer.h b/src/cpp/ripple/Offer.h index 815cfde09..75cc5dc57 100644 --- a/src/cpp/ripple/Offer.h +++ b/src/cpp/ripple/Offer.h @@ -6,6 +6,7 @@ class Offer : public AccountItem RippleAddress mAccount; STAmount mTakerGets; STAmount mTakerPays; + int mSeq; Offer(SerializedLedgerEntry::pointer ledgerEntry); // For accounts in a ledger @@ -17,5 +18,6 @@ public: STAmount getTakerPays(){ return(mTakerPays); } STAmount getTakerGets(){ return(mTakerGets); } RippleAddress getAccount(){ return(mAccount); } + int getSeq(){ return(mSeq); } }; \ No newline at end of file diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index ad53e90aa..c2fa4648d 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -643,6 +643,7 @@ Json::Value RPCHandler::doAccountOffers(Json::Value jvRequest) //obj["account"] = account.humanAccountID(); obj["taker_pays"] = takerPays.getJson(0); obj["taker_gets"] = takerGets.getJson(0); + obj["seq"] = offer->getSeq(); jsonLines.append(obj); }