uint64_t SysTestBase::GetBalance(const string& strID) { Value valueRes = GetAccountInfo(strID); BOOST_CHECK(valueRes.type() != null_type); Value result = find_value(valueRes.get_obj(), "Balance"); BOOST_CHECK(result.type() != null_type); uint64_t nMoney = result.get_int64(); return nMoney; }
bool SysTestBase::IsScriptAccCreated(const string& strScript) { Value valueRes = GetAccountInfo(strScript); if (valueRes.type() == null_type) return false; Value result = find_value(valueRes.get_obj(), "KeyID"); if (result.type() == null_type) return false; return true; }
BOOL CLoginAccountList::GetLastLoginAccountInfo(LOGIN_ACCOUNT_INFO * lpAccount) { if (NULL == lpAccount) return FALSE; LOGIN_ACCOUNT_INFO * lpAccount2 = GetAccountInfo(m_nLastLoginUser); if (NULL == lpAccount2) return FALSE; memcpy(lpAccount, lpAccount2, sizeof(LOGIN_ACCOUNT_INFO)); return TRUE; }
bool SysTestBase::GetRegID(string& strAddr,string& regID){ Value value = GetAccountInfo(strAddr); regID = "RegID"; return GetStrFromObj(value,regID); }
void DeleteAccountCommand::RunImpl() { GetAccountInfo(); }
BOOL CLoginAccountList::IsAutoLogin() { LOGIN_ACCOUNT_INFO * lpAccount = GetAccountInfo(m_nLastLoginUser); return (lpAccount != NULL) ? lpAccount->bAutoLogin : FALSE; }
LOGIN_ACCOUNT_INFO * CLoginAccountList::GetLastLoginAccountInfo() { return GetAccountInfo(m_nLastLoginUser); }