mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add owner_funds to client subscription data (RIPD-377)
Conflicts: src/ripple/module/app/ledger/AcceptedLedger.cpp
This commit is contained in:
committed by
Vinnie Falco
parent
6e934ee6a1
commit
ce2cecf046
@@ -2546,7 +2546,7 @@ void NetworkOPsImp::pubProposedTransaction (
|
||||
}
|
||||
}
|
||||
}
|
||||
AcceptedLedgerTx alt (stTxn, terResult);
|
||||
AcceptedLedgerTx alt (lpCurrent, stTxn, terResult);
|
||||
m_journal.trace << "pubProposed: " << alt.getJson ();
|
||||
pubAccountTransaction (lpCurrent, alt, false);
|
||||
}
|
||||
@@ -3133,6 +3133,7 @@ void NetworkOPsImp::getBookPage (
|
||||
auto const& saTakerPays =
|
||||
sleOffer->getFieldAmount (sfTakerPays);
|
||||
STAmount saOwnerFunds;
|
||||
bool firstOwnerOffer (true);
|
||||
|
||||
if (book.out.account == uOfferOwnerID)
|
||||
{
|
||||
@@ -3154,6 +3155,7 @@ void NetworkOPsImp::getBookPage (
|
||||
// Found in running balance table.
|
||||
|
||||
saOwnerFunds = umBalanceEntry->second;
|
||||
firstOwnerOffer = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3227,12 +3229,12 @@ void NetworkOPsImp::getBookPage (
|
||||
|
||||
umBalance[uOfferOwnerID] = saOwnerFunds - saOwnerPays;
|
||||
|
||||
if (saOwnerFunds != zero || uOfferOwnerID == uTakerID)
|
||||
{
|
||||
// Only provide funded offers and offers of the taker.
|
||||
Json::Value& jvOf = jvOffers.append (jvOffer);
|
||||
jvOf[jss::quality] = saDirRate.getText ();
|
||||
}
|
||||
// Include all offers funded and unfunded
|
||||
Json::Value& jvOf = jvOffers.append (jvOffer);
|
||||
jvOf[jss::quality] = saDirRate.getText ();
|
||||
|
||||
if (firstOwnerOffer)
|
||||
jvOf[jss::owner_funds] = saOwnerFunds.getText ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user