diff --git a/src/AccountState.cpp b/src/AccountState.cpp index b9cea5936b..235616dfb8 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 bd7503cb11..1a3de87095 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 739947d933..6239115cc4 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 55c312cb42..944a281139 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;