Cosmetic fixes.

This commit is contained in:
JoelKatz
2012-05-08 19:53:54 -07:00
parent 71b61a633d
commit 25a2d6f151
2 changed files with 16 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ public:
protected:
// core account information
CKey::pointer mPublicKey;
NewcoinAddress mAcctID;
NewcoinAddress mAccount;
std::string mComment;
// family information
@@ -32,7 +32,7 @@ public:
bool updateName(); // writes changed name/comment
bool updateBalance(); // writes changed balance/seq
const NewcoinAddress& getAddress() const { return mAcctID; }
const NewcoinAddress& getAddress() const { return mAccount; }
int getAcctFSeq() const { return mAccountFSeq; }
std::string getFullName() const;

View File

@@ -28,8 +28,8 @@
LocalAccount::LocalAccount(boost::shared_ptr<LocalAccountFamily> family, int familySeq) :
mPublicKey(family->getPublicKey(familySeq)), mFamily(family), mAccountFSeq(familySeq)
{
mAcctID.setAccountPublic(mPublicKey->GetPubKey());
if(theApp!=NULL) mPublicKey = theApp->getPubKeyCache().store(mAcctID, mPublicKey);
mAccount.setAccountPublic(mPublicKey->GetPubKey());
if (theApp != NULL) mPublicKey = theApp->getPubKeyCache().store(mAccount, mPublicKey);
}
std::string LocalAccount::getFullName() const
@@ -52,7 +52,7 @@ std::string LocalAccount::getFamilyName() const
AccountState::pointer LocalAccount::getAccountState() const
{
return theApp->getOPs().getAccountState(mAcctID);
return theApp->getOPs().getAccountState(mAccount);
}
uint64 LocalAccount::getEffectiveBalance() const
@@ -73,12 +73,13 @@ Json::Value LocalAccount::getJson() const
ret["IsLocked"] = mFamily->isLocked();
AccountState::pointer as = getAccountState();
if (!as) ret["Account"] = "None";
if (!as) ret["State"] = "None";
else
{
assert(as->getAccountID().getAccountID() == mAccount.getAccountID());
Json::Value acct(Json::objectValue);
as->addJson(acct);
ret["Account"] = acct;
ret["State"] = acct;
}
return ret;