         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: {}


    refresh_transactions: () ->
        return @transactions_loading_promise if @transactions_loading_promise
        console.log "------ refresh_transactions ------>", getStackTrace()
        deffered = @q.defer()

        @transactions_loading_promise = deffered.promise
