                 action: ->
                     (contact)->
                         $scope.gravatar_account_name = $scope.transfer_info.payto = contact
+                        $scope.add_to_address_book.error = ""
 
     $scope.onSelect = (name) ->
         $scope.transfer_info.payto = name

            $scope.transfer_info.amount = ""
            my_transfer_form.amount.$setPristine()
            $scope.transfer_info.memo = ""
            Growl.notice "", "Transfer transaction broadcasted"
            $scope.model.t_active=true
        , (error) ->

        $filter('filter')(Object.keys(Wallet.favorites),input)

    $scope.addToAddressBook = (name) ->
        error_handler = (error) ->
            message = Utils.formatAssertException(error.data.error.message)
            $scope.add_to_address_book.error = if message and message.length > 2 then message else ""
            $scope.newContactModal(true)

        WalletAPI.account_set_favorite(name, true, error_handler).then ->
            account = Wallet.accounts[name]
            if account
