[GUI] Fix object update notification handling

This commit is contained in:
Nathan Hourt 2015-07-21 17:56:52 -04:00
parent f72f07b05b
commit ce84de41be
2 changed files with 9 additions and 3 deletions

View file

@ -151,7 +151,7 @@ namespace graphene { namespace app {
*
*/
std::map<string,full_account> get_full_accounts(std::function<void(const variant&)> callback,
const vector<string>& names_or_ids);
const vector<string>& names_or_ids);
/**
* Stop receiving updates generated by get_full_accounts()
@ -309,7 +309,7 @@ namespace graphene { namespace app {
/**
* This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for
* and return the minimal subset of public keys that should add signatures to the transaction.
* and return the minimal subset of public keys that should add signatures to the transaction.
*/
set<public_key_type> get_required_signatures( const signed_transaction& trx, const flat_set<public_key_type>& available_keys )const;

View file

@ -141,7 +141,13 @@ void ChainDataModel::getAccountImpl(QString accountIdentifier, Account* const *
try {
ilog("Fetching account ${acct}", ("acct", accountIdentifier.toStdString()));
auto result = m_db_api->get_full_accounts([this](const fc::variant& v) {
processUpdatedObject(v);
vector<variant> updates = v.as<vector<variant>>();
for (const variant& update : updates) {
if (update.is_object())
processUpdatedObject(update);
else
elog("Handling object deletions is not yet implemented: ${update}", ("update", update));
}
}, {accountIdentifier.toStdString()});
fc::optional<full_account> accountPackage;