Skip to content
Permalink
Browse files

add address to tokencontroller

  • Loading branch information...
elaineo committed Mar 20, 2017
1 parent 257c07e commit 6ad0fa40695770c6b71d25a6b2cd8f36297bc155
Showing with 6 additions and 3 deletions.
  1. +6 −3 public/js/controllers/TokenController.js
@@ -8,15 +8,18 @@ angular.module('BlocksApp').controller('TokenController', function($stateParams,
$scope.activeTab = activeTab[1];

$rootScope.$state.current.data["pageSubTitle"] = $stateParams.hash; //replace with token name
$scope.token = {"balance": 0, "extra_balance": 0, "address": $stateParams.hash};
var address = isAddress($stateParams.hash) ? $stateParams.hash : undefined;
$scope.token = {"balance": 0};

//fetch dao stuff
$http({
method: 'POST',
url: '/tokenrelay',
data: {"action": "info"}
data: {"action": "info", "address": address}
}).success(function(data) {
console.log(data)
$scope.token = data;
$scope.token.address = address;
});

$scope.form = {};
@@ -34,7 +37,7 @@ angular.module('BlocksApp').controller('TokenController', function($stateParams,
$http({
method: 'POST',
url: '/tokenrelay',
data: {"action": "balanceOf", "addr": addr}
data: {"action": "balanceOf", "user": addr, "address": address}
}).success(function(data) {
console.log(data)
$scope.showTokens = true;

0 comments on commit 6ad0fa4

Please sign in to comment.
You can’t perform that action at this time.