add fee to tx history

This commit is contained in:
Matias Alejo Garcia 2015-07-17 14:30:55 -03:00
parent 9743dabcb3
commit 73f7d9a22b
3 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,10 @@
<time>{{ btx.time * 1000 | amCalendar}}</time>
</span>
</li>
<li class="line-b p10">
<span class="text-gray" translate>Fee</span>:
<span class="right">{{feeStr}}</span>
</li>
<li ng-if="btx.message" class="line-b p10 oh">
<span class="text-gray" translate>Note</span>:
<span class="right">

View File

@ -442,6 +442,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
};
self.setTxHistory = function(txs) {
var config = configService.getSync().wallet.settings;
var now = Math.floor(Date.now() / 1000);
var c = 0;
self.txHistoryPaging = txs[self.limitHistory] ? true : false;
@ -453,6 +454,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
tx.rateTs = Math.floor((tx.ts || now) / 1000);
tx.amountStr = profileService.formatAmount(tx.amount); //$filter('noFractionNumber')(
if (tx.fees)
tx.feeStr = profileService.formatAmount(tx.fees) + ' ' + config.unitName;
if (c < self.limitHistory) {
self.txHistory.push(tx);
c++;

View File

@ -994,6 +994,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.color = fc.backgroundColor;
$scope.copayerId = fc.credentials.copayerId;
$scope.isShared = fc.credentials.n > 1;
$scope.feeStr = btx.feeStr;
$scope.getAmount = function(amount) {
return self.getAmount(amount);