Skip to content

Commit

Permalink
fix(portfolio): reissue button was always enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
beregovoy68 committed Nov 23, 2016
1 parent 6080f2a commit 79acf4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ <h2 class="sectionHeader">PORTFOLIO</h2>
<td>{{tx.balance}}</td>
<td>
<button ng-click="assetList.assetTransfer(tx.id)">Transfer</button><span class="divider-2"></span>
<button ng-enable="tx.formatted.canReissue" ng-click="assetList.assetReissue(tx.id)">Reissue</button><span class="divider-2"></span>
<button ng-disabled="!tx.formatted.canReissue" ng-click="assetList.assetReissue(tx.id)">Reissue</button><span class="divider-2"></span>
<button ng-click="assetList.assetDetails(tx.id)">Details</button>
</td>
</tr>
Expand Down
6 changes: 4 additions & 2 deletions src/js/portfolio/asset.list.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@
}

var cached = applicationContext.cache.assets[asset.id];
cached.balance = Money.fromCoins(asset.balance, cached.currency);
if (angular.isNumber(asset.balance)) {
cached.balance = Money.fromCoins(asset.balance, cached.currency);
asset.balance = cached.balance.formatAmount();
}

asset.name = cached.currency.displayName;
asset.total = cached.totalTokens.formatAmount();
asset.balance = cached.balance.formatAmount();
asset.timestamp = formattingService.formatTimestamp(cached.timestamp);
asset.reissuable = cached.reissuable;
asset.sender = cached.sender;
Expand Down

0 comments on commit 79acf4c

Please sign in to comment.