Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. diff --git a/app/js/controllers/transfer.coffee b/app/js/controllers/transfer.coffee
  2. index 3224d74..8c0494e 100644
  3. --- a/app/js/controllers/transfer.coffee
  4. +++ b/app/js/controllers/transfer.coffee
  5. @@ -52,10 +52,7 @@ angular.module("app").controller "TransferController", ($scope, $stateParams, $m
  6. frequency: "each_block"
  7. update: (data, deferred) ->
  8. Wallet.refresh_account($scope.account_from_name).then ->
  9. - $scope.balances = Wallet.balances[$scope.account_from_name]
  10. - $scope.currencies = if $scope.balances then Object.keys($scope.balances) else []
  11. - $scope.currencies.unshift("") if $scope.currencies.length > 1
  12. - $scope.transfer_info.symbol = if $scope.currencies.length then $scope.currencies[0] else ""
  13. + $scope.balances = Wallet.balances[$scope.account_from_name] or []
  14. $scope.refreshing_balances = false
  15. deferred.resolve(true)
  16. , (error) ->
  17. @@ -63,6 +60,13 @@ angular.module("app").controller "TransferController", ($scope, $stateParams, $m
  18. deferred.reject(false)
  19. Observer.registerObserver(account_balances_observer)
  20.  
  21. + ### Populate the currencies drop-down .. ###
  22. + Wallet.refresh_account($scope.account_from_name).then ->
  23. + $scope.balances = Wallet.balances[$scope.account_from_name] or []
  24. + $scope.currencies = Object.keys($scope.balances) unless $scope.currencies
  25. + $scope.currencies.unshift("") if $scope.currencies.length > 1
  26. + $scope.transfer_info.symbol = if $scope.currencies.length then $scope.currencies[0] else ""
  27. +
  28. $scope.$on "$destroy", ->
  29. Observer.unregisterObserver(account_balances_observer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement