From 6694372af721680cd3706c7dbfe4fe08afd61542 Mon Sep 17 00:00:00 2001 From: jed Date: Mon, 20 Aug 2012 17:01:53 -0700 Subject: [PATCH] . --- src/AccountState.cpp | 6 +++--- src/AccountState.h | 2 +- src/Ledger.cpp | 2 +- src/utils.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/AccountState.cpp b/src/AccountState.cpp index b9cea5936..235616dfb 100644 --- a/src/AccountState.cpp +++ b/src/AccountState.cpp @@ -20,8 +20,8 @@ AccountState::AccountState(const NewcoinAddress& naAccountID) : mAccountID(naAcc mValid = true; } -AccountState::AccountState(const SerializedLedgerEntry::pointer& ledgerEntry) : - mLedgerEntry(ledgerEntry), mValid(false) +AccountState::AccountState(const SerializedLedgerEntry::pointer& ledgerEntry,const NewcoinAddress& naAccountID) : + mLedgerEntry(ledgerEntry), mValid(false), mAccountID(naAccountID) { if (!mLedgerEntry) return; if (mLedgerEntry->getType() != ltACCOUNT_ROOT) return; @@ -44,7 +44,7 @@ void AccountState::addJson(Json::Value& val) if (mValid) { - val["AccountID"] = mAccountID.humanAccountID(); + val["Account"] = mAccountID.humanAccountID(); if (mLedgerEntry->getIFieldPresent(sfEmailHash)) val["UrlGravatar"] = createGravatarUrl(mLedgerEntry->getIFieldH128(sfEmailHash)); diff --git a/src/AccountState.h b/src/AccountState.h index bd7503cb1..1a3de8709 100644 --- a/src/AccountState.h +++ b/src/AccountState.h @@ -29,7 +29,7 @@ private: public: AccountState(const NewcoinAddress& naAccountID); // For new accounts - AccountState(const SerializedLedgerEntry::pointer& ledgerEntry); // For accounts in a ledger + AccountState(const SerializedLedgerEntry::pointer& ledgerEntry,const NewcoinAddress& naAccountI); // For accounts in a ledger bool bHaveAuthorizedKey() { diff --git a/src/Ledger.cpp b/src/Ledger.cpp index 739947d93..6239115cc 100644 --- a/src/Ledger.cpp +++ b/src/Ledger.cpp @@ -178,7 +178,7 @@ AccountState::pointer Ledger::getAccountState(const NewcoinAddress& accountID) SerializedLedgerEntry::pointer sle = boost::make_shared(item->peekSerializer(), item->getTag()); if (sle->getType() != ltACCOUNT_ROOT) return AccountState::pointer(); - return boost::make_shared(sle); + return boost::make_shared(sle,accountID); } NicknameState::pointer Ledger::getNicknameState(const uint256& uNickname) diff --git a/src/utils.cpp b/src/utils.cpp index 55c312cb4..944a28113 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -169,7 +169,7 @@ bool parseQuality(const std::string& strSource, uint32& uQuality) float fQuality = lexical_cast_s(strSource); if (fQuality) - uQuality = QUALITY_ONE*fQuality; + uQuality = (uint32)(QUALITY_ONE*fQuality); } return !!uQuality;