         acct.registered = val.registration_date and val.registration_date != "1970-01-01T00:00:00"
         #console.log "populate_account",acct.name
         @accounts[acct.name] = acct
+        @favorites[acct.name] = acct if acct.is_favorite
         return acct
 
     refresh_account: (name) ->
         @wallet_api.get_account(name).then (result) => # TODO no such acct?
             @populate_account(result)
             @refresh_balances()
+            return @accounts[name]
 
     refresh_accounts: () ->
         @refresh_accounts_request = on

class Wallet

    accounts: {}

    balances: {}
    bonuses: {}


            account_transaction_history_promise.then (result) =>
                for val in result
                    console.log "------ account_transaction ------>", val
                    @transactions_last_block = val.block_num
                    @process_transaction(val) if val.is_confirmed

