settings: fix references to unitName

This commit is contained in:
Manuel Araoz 2014-09-03 16:24:25 -03:00
commit 0fe4778637
10 changed files with 113 additions and 114 deletions

View file

@ -30,6 +30,7 @@ var defaultConfig = {
settings: { settings: {
unitName: 'bits', unitName: 'bits',
unitToSatoshi: 100, unitToSatoshi: 100,
unitDecimals: 2,
alternativeName: 'US Dollar', alternativeName: 'US Dollar',
alternativeIsoCode: 'USD', alternativeIsoCode: 'USD',
} }

View file

@ -5,13 +5,13 @@ angular.module('copayApp.controllers').controller('SendController',
function($scope, $rootScope, $window, $timeout, $anchorScroll, $modal, isMobile, notification, controllerUtils, rateService) { function($scope, $rootScope, $window, $timeout, $anchorScroll, $modal, isMobile, notification, controllerUtils, rateService) {
$scope.title = 'Send'; $scope.title = 'Send';
$scope.loading = false; $scope.loading = false;
var satToUnit = 1 / config.unitToSatoshi; var satToUnit = 1 / $rootScope.wallet.settings.unitToSatoshi;
$scope.defaultFee = bitcore.TransactionBuilder.FEE_PER_1000B_SAT * satToUnit; $scope.defaultFee = bitcore.TransactionBuilder.FEE_PER_1000B_SAT * satToUnit;
$scope.unitToBtc = config.unitToSatoshi / bitcore.util.COIN; $scope.unitToBtc = $rootScope.wallet.settings.unitToSatoshi / bitcore.util.COIN;
$scope.unitToSatoshi = config.unitToSatoshi; $scope.unitToSatoshi = $rootScope.wallet.settings.unitToSatoshi;
$scope.alternativeName = config.alternativeName; $scope.alternativeName = $rootScope.wallet.settings.alternativeName;
$scope.alternativeIsoCode = config.alternativeIsoCode; $scope.alternativeIsoCode = $rootScope.wallet.settings.alternativeIsoCode;
$scope.isRateAvailable = false; $scope.isRateAvailable = false;
$scope.rateService = rateService; $scope.rateService = rateService;
@ -36,7 +36,7 @@ angular.module('copayApp.controllers').controller('SendController',
this._alternative = newValue; this._alternative = newValue;
if (typeof(newValue) === 'number' && $scope.isRateAvailable) { if (typeof(newValue) === 'number' && $scope.isRateAvailable) {
this._amount = parseFloat( this._amount = parseFloat(
(rateService.fromFiat(newValue, config.alternativeIsoCode) * satToUnit).toFixed(config.unitDecimals), 10); (rateService.fromFiat(newValue, $rootScope.wallet.settings.alternativeIsoCode) * satToUnit).toFixed($rootScope.wallet.settings.unitDecimals), 10);
} else { } else {
this._amount = 0; this._amount = 0;
} }
@ -53,7 +53,7 @@ angular.module('copayApp.controllers').controller('SendController',
this._amount = newValue; this._amount = newValue;
if (typeof(newValue) === 'number' && $scope.isRateAvailable) { if (typeof(newValue) === 'number' && $scope.isRateAvailable) {
this._alternative = parseFloat( this._alternative = parseFloat(
(rateService.toFiat(newValue * config.unitToSatoshi, config.alternativeIsoCode)).toFixed(2), 10); (rateService.toFiat(newValue * $rootScope.wallet.settings.unitToSatoshi, $rootScope.wallet.settings.alternativeIsoCode)).toFixed(2), 10);
} else { } else {
this._alternative = 0; this._alternative = 0;
} }
@ -91,7 +91,7 @@ angular.module('copayApp.controllers').controller('SendController',
if ($rootScope.pendingPayment) { if ($rootScope.pendingPayment) {
var pp = $rootScope.pendingPayment; var pp = $rootScope.pendingPayment;
$scope.address = pp.address + ''; $scope.address = pp.address + '';
var amount = pp.data.amount / config.unitToSatoshi * 100000000; var amount = pp.data.amount / $rootScope.wallet.settings.unitToSatoshi * 100000000;
$scope.amount = amount; $scope.amount = amount;
$scope.commentText = pp.data.message; $scope.commentText = pp.data.message;
} }
@ -113,7 +113,7 @@ angular.module('copayApp.controllers').controller('SendController',
$scope.loading = true; $scope.loading = true;
var address = form.address.$modelValue; var address = form.address.$modelValue;
var amount = parseInt((form.amount.$modelValue * config.unitToSatoshi).toFixed(0)); var amount = parseInt((form.amount.$modelValue * $rootScope.wallet.settings.unitToSatoshi).toFixed(0));
var commentText = form.comment.$modelValue; var commentText = form.comment.$modelValue;
var w = $rootScope.wallet; var w = $rootScope.wallet;
@ -403,7 +403,7 @@ angular.module('copayApp.controllers').controller('SendController',
}; };
$scope.getAvailableAmount = function() { $scope.getAvailableAmount = function() {
var amount = ((($rootScope.availableBalance * config.unitToSatoshi).toFixed(0) - bitcore.TransactionBuilder.FEE_PER_1000B_SAT) / config.unitToSatoshi); var amount = ((($rootScope.availableBalance * $rootScope.wallet.settings.unitToSatoshi).toFixed(0) - bitcore.TransactionBuilder.FEE_PER_1000B_SAT) / $rootScope.wallet.settings.unitToSatoshi);
return amount > 0 ? amount : 0; return amount > 0 ? amount : 0;
}; };
@ -497,7 +497,7 @@ angular.module('copayApp.controllers').controller('SendController',
// Payment Protocol URI (BIP-72) // Payment Protocol URI (BIP-72)
scope.wallet.fetchPaymentTx(uri.merchant, function(err, merchantData) { scope.wallet.fetchPaymentTx(uri.merchant, function(err, merchantData) {
var balance = $rootScope.availableBalance; var balance = $rootScope.availableBalance;
var available = +(balance * config.unitToSatoshi).toFixed(0); var available = +(balance * $rootScope.wallet.settings.unitToSatoshi).toFixed(0);
if (merchantData && available < +merchantData.total) { if (merchantData && available < +merchantData.total) {
err = new Error('No unspent outputs available.'); err = new Error('No unspent outputs available.');
@ -508,7 +508,7 @@ angular.module('copayApp.controllers').controller('SendController',
scope.sendForm.address.$isValid = false; scope.sendForm.address.$isValid = false;
if (err.amount) { if (err.amount) {
scope.sendForm.amount.$setViewValue(+err.amount / config.unitToSatoshi); scope.sendForm.amount.$setViewValue(+err.amount / $rootScope.wallet.settings.unitToSatoshi);
scope.sendForm.amount.$render(); scope.sendForm.amount.$render();
scope.sendForm.amount.$isValid = false; scope.sendForm.amount.$isValid = false;
scope.notEnoughAmount = true; scope.notEnoughAmount = true;
@ -538,7 +538,7 @@ angular.module('copayApp.controllers').controller('SendController',
var url = merchantData.request_url; var url = merchantData.request_url;
var domain = /^(?:https?)?:\/\/([^\/:]+).*$/.exec(url)[1]; var domain = /^(?:https?)?:\/\/([^\/:]+).*$/.exec(url)[1];
merchantData.unitTotal = (+merchantData.total / config.unitToSatoshi) + ''; merchantData.unitTotal = (+merchantData.total / $rootScope.wallet.settings.unitToSatoshi) + '';
merchantData.expiration = new Date( merchantData.expiration = new Date(
merchantData.pr.pd.expires * 1000).toISOString(); merchantData.pr.pd.expires * 1000).toISOString();
merchantData.domain = domain; merchantData.domain = domain;
@ -587,8 +587,10 @@ angular.module('copayApp.controllers').controller('SendController',
} }
notification.info('Payment Request', notification.info('Payment Request',
'Server is requesting ' + merchantData.unitTotal + ' ' + config.unitName + '.' + ' Message: ' + merchantData.pr.pd.memo); 'Server is requesting ' + merchantData.unitTotal +
' ' + $rootScope.wallet.settings.unitName +
'.' + ' Message: ' + merchantData.pr.pd.memo);
}); });
}; };
}); });

View file

@ -44,43 +44,42 @@ angular.module('copayApp.filters', [])
return addrs; return addrs;
}; };
}) })
.filter('noFractionNumber', .filter('noFractionNumber', ['$filter', '$locale', '$rootScope',
[ '$filter', '$locale', '$rootScope', function(filter, locale, $rootScope) {
function(filter, locale, $rootScope) { var numberFilter = filter('number');
var numberFilter = filter('number'); var formats = locale.NUMBER_FORMATS;
var formats = locale.NUMBER_FORMATS; return function(amount, n) {
return function(amount, n) { var fractionSize = (typeof(n) !== 'undefined') ?
var fractionSize = (typeof(n) != 'undefined') ? n : $rootScope.wallet.settings.unitToSatoshi.toString().length - 1; n : $rootScope.wallet.settings.unitToSatoshi.toString().length - 1;
var value = numberFilter(amount, fractionSize); var value = numberFilter(amount, fractionSize);
var sep = value.indexOf(formats.DECIMAL_SEP); var sep = value.indexOf(formats.DECIMAL_SEP);
var group = value.indexOf(formats.GROUP_SEP); var group = value.indexOf(formats.GROUP_SEP);
if(amount >= 0) { if (amount >= 0) {
if (group > 0) { if (group > 0) {
if (sep < 0) { if (sep < 0) {
return value;
}
var intValue = value.substring(0, sep);
var floatValue = parseFloat(value.substring(sep));
if (floatValue === 0) {
floatValue = '';
} else {
if (floatValue % 1 === 0) {
floatValue = floatValue.toFixed(0);
}
floatValue = floatValue.toString().substring(1);
}
var finalValue = intValue + floatValue;
return finalValue;
} else {
value = parseFloat(value);
if (value % 1 === 0) {
value = value.toFixed(0);
}
return value; return value;
} }
var intValue = value.substring(0, sep);
var floatValue = parseFloat(value.substring(sep));
if (floatValue === 0) {
floatValue = '';
}
else {
if(floatValue % 1 === 0) {
floatValue = floatValue.toFixed(0);
}
floatValue = floatValue.toString().substring(1);
}
var finalValue = intValue + floatValue;
return finalValue;
} }
else { return 0;
value = parseFloat(value); };
if(value % 1 === 0) { }
value = value.toFixed(0); ]);
}
return value;
}
}
return 0;
};
} ]);

View file

@ -4,39 +4,39 @@
<span translate>Addresses</span> <span translate>Addresses</span>
<span class="button primary small side-bar" ng-click="newAddr()" ng-disabled="loading"><i class="fi-plus"></i></span> <span class="button primary small side-bar" ng-click="newAddr()" ng-disabled="loading"><i class="fi-plus"></i></span>
</h1> </h1>
<div class="large-12 medium-12" ng-if="!!(addresses|removeEmpty).length"> <div class="large-12 medium-12" ng-if="!!(addresses|removeEmpty).length">
<div class="large-12 medium-12" ng-init="showAll=0"> <div class="large-12 medium-12" ng-init="showAll=0">
<div class="panel radius oh" ng-repeat="addr in addresses|removeEmpty|limitAddress:showAll"> <div class="panel radius oh" ng-repeat="addr in addresses|removeEmpty|limitAddress:showAll">
<div class="row collapse"> <div class="row collapse">
<div class="large-10 medium-9 small-8 column" > <div class="large-10 medium-9 small-8 column">
<div class="ellipsis list-addr"> <div class="ellipsis list-addr">
<i class="fi-thumbnails size-48 show-for-large-up" ng-click="openAddressModal(addr)">&nbsp;</i> <i class="fi-thumbnails size-48 show-for-large-up" ng-click="openAddressModal(addr)">&nbsp;</i>
<span> <span>
<contact address="{{addr.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/> <contact address="{{addr.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/>
</span> </span>
<span class="btn-copy" clip-copy="addr.address"> </span> <span class="btn-copy" clip-copy="addr.address"> </span>
<small translate class="label" ng-if="addr.isChange">change</small> <small translate class="label" ng-if="addr.isChange">change</small>
</div>
</div>
<div class="large-2 medium-3 small-4 column text-right">
<span ng-if="$root.updatingBalance">
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
</span>
<span class="size-12" ng-if="!$root.updatingBalance">
{{addr.balance || 0|noFractionNumber}} {{$root.unitName}}
</span>
</div> </div>
</div> </div>
</div> </div>
<a class="secondary radius" ng-click="showAll=!showAll" ng-show="(addresses|removeEmpty).length != (addresses|removeEmpty|limitAddress).length"> <div class="large-2 medium-3 small-4 column text-right">
<span translate ng-if="!showAll">Show all</span> <span ng-if="$root.updatingBalance">
<span translate ng-if="showAll">Show less</span> <i class="fi-bitcoin-circle icon-rotate spinner"></i>
</a> </span>
<span class="size-12" ng-if="!$root.updatingBalance">
{{addr.balance || 0|noFractionNumber}} {{$root.wallet.settings.unitName}}
</span>
</div>
</div>
</div> </div>
<a class="secondary radius" ng-click="showAll=!showAll" ng-show="(addresses|removeEmpty).length != (addresses|removeEmpty|limitAddress).length">
<span translate ng-if="!showAll">Show all</span>
<span translate ng-if="showAll">Show less</span>
</a>
</div> </div>
</div> </div>
</div> </div>

View file

@ -19,7 +19,7 @@
tooltip="{{totalBalanceBTC |noFractionNumber:8}} BTC" tooltip="{{totalBalanceBTC |noFractionNumber:8}} BTC"
tooltip-trigger="mouseenter" tooltip-trigger="mouseenter"
tooltip-placement="bottom">{{totalBalance || 0 tooltip-placement="bottom">{{totalBalance || 0
|noFractionNumber}} {{$root.unitName}} |noFractionNumber}} {{$root.wallet.settings.unitName}}
</span> </span>
</div> </div>
<div> <div>
@ -31,7 +31,7 @@
data-options="disable_for_touch:true" data-options="disable_for_touch:true"
tooltip="{{lockedBalanceBTC |noFractionNumber:8}} BTC" tooltip="{{lockedBalanceBTC |noFractionNumber:8}} BTC"
tooltip-trigger="mouseenter" tooltip-trigger="mouseenter"
tooltip-placement="bottom">{{lockedBalance || 0|noFractionNumber}} {{$root.unitName}} tooltip-placement="bottom">{{lockedBalance || 0|noFractionNumber}} {{$root.wallet.settings.unitName}}
</span> &nbsp;<i class="fi-info medium" tooltip="Balance locked in pending transaction proposals" tooltip-placement="bottom"></i> </span> &nbsp;<i class="fi-info medium" tooltip="Balance locked in pending transaction proposals" tooltip-placement="bottom"></i>
</div> </div>
<div class="line-sidebar-b"></div> <div class="line-sidebar-b"></div>

View file

@ -26,7 +26,7 @@
tooltip-popup-delay='500' tooltip-popup-delay='500'
tooltip="{{totalBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}}" tooltip="{{totalBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}}"
tooltip-trigger="mouseenter" tooltip-trigger="mouseenter"
tooltip-placement="bottom">{{totalBalance || 0 |noFractionNumber}} {{$root.unitName}} tooltip-placement="bottom">{{totalBalance || 0 |noFractionNumber}} {{$root.wallet.settings.unitName}}
</span> </span>
<div class="m10t" ng-show="lockedBalance"> <div class="m10t" ng-show="lockedBalance">
<span translate>Locked</span> &nbsp; <span translate>Locked</span> &nbsp;
@ -39,7 +39,7 @@
tooltip-popup-delay='500' tooltip-popup-delay='500'
tooltip="{{lockedBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}}" tooltip="{{lockedBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}}"
tooltip-trigger="mouseenter" tooltip-trigger="mouseenter"
tooltip-placement="bottom">{{lockedBalance || 0|noFractionNumber}} {{$root.unitName}} tooltip-placement="bottom">{{lockedBalance || 0|noFractionNumber}} {{$root.wallet.settings.unitName}}
</span> &nbsp;<i class="fi-info medium" tooltip="{{'Balance locked in pending transaction proposals'|translate}}" tooltip-placement="bottom"></i> </span> &nbsp;<i class="fi-info medium" tooltip="{{'Balance locked in pending transaction proposals'|translate}}" tooltip-placement="bottom"></i>
</div> </div>
</div> </div>

View file

@ -8,20 +8,19 @@
</a> </a>
</div> </div>
<div class="show-for-small-only small-12 columns m10b" ng-show="tx.comment"> <div class="show-for-small-only small-12 columns m10b" ng-show="tx.comment">
<p class="size-14 label" > <p class="size-14 label">
{{tx.comment}} - {{tx.comment}} - {{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}}
{{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}}
</p> </p>
</div> </div>
<div class="large-8 medium-8 small-8 columns"> <div class="large-8 medium-8 small-8 columns">
<div ng-repeat="out in tx.outs"> <div ng-repeat="out in tx.outs">
<div class="large-3 medium-3 small-3 columns"> <div class="large-3 medium-3 small-3 columns">
<p class="size-14 hide-for-small-only">{{out.value | noFractionNumber}} {{$root.unitName}}</p> <p class="size-14 hide-for-small-only">{{out.value | noFractionNumber}} {{$root.wallet.settings.unitName}}</p>
<p class="size-12 show-for-small-only">{{out.value | noFractionNumber}} {{$root.unitName}}</p> <p class="size-12 show-for-small-only">{{out.value | noFractionNumber}} {{$root.wallet.settings.unitName}}</p>
</div> </div>
<div class="large-1 medium-1 small-2 columns fi-arrow-right"> </div> <div class="large-1 medium-1 small-2 columns fi-arrow-right"></div>
<div class="large-8 medium-8 small-7 columns ellipsis"> <div class="large-8 medium-8 small-7 columns ellipsis">
<contact address="{{out.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/> <contact address="{{out.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right" />
</div> </div>
</div> </div>
</div> </div>
@ -37,25 +36,25 @@
</a> </a>
<div class="box-status"> <div class="box-status">
<a ng-if="c.actions.create" tooltip-popup-delay="1000" tooltip="Created {{c.actions.create | amTimeAgo}}"> <a ng-if="c.actions.create" tooltip-popup-delay="1000" tooltip="Created {{c.actions.create | amTimeAgo}}">
<i class="fi-crown icon-status icon-active"></i> <i class="fi-crown icon-status icon-active"></i>
</a> </a>
<a ng-if="!c.actions.create"><i class="fi-crown icon-status"></i></a> <a ng-if="!c.actions.create"><i class="fi-crown icon-status"></i></a>
<a ng-if="c.actions.seen" tooltip-popup-delay="1000" tooltip="Seen {{c.actions.seen | amTimeAgo}}"> <a ng-if="c.actions.seen" tooltip-popup-delay="1000" tooltip="Seen {{c.actions.seen | amTimeAgo}}">
<i class="fi-eye icon-status icon-active"></i> <i class="fi-eye icon-status icon-active"></i>
</a> </a>
<a ng-if="!c.actions.seen"><i class="fi-eye icon-status"></i></a> <a ng-if="!c.actions.seen"><i class="fi-eye icon-status"></i></a>
<a ng-if="c.actions.rejected" tooltip-popup-delay="1000" tooltip="Rejected {{c.actions.rejected | amTimeAgo}}"> <a ng-if="c.actions.rejected" tooltip-popup-delay="1000" tooltip="Rejected {{c.actions.rejected | amTimeAgo}}">
<i class="fi-x icon-status icon-active-x"></i> <i class="fi-x icon-status icon-active-x"></i>
</a> </a>
<a ng-if="c.actions.sign" tooltip-popup-delay="1000" tooltip="Signed {{c.actions.sign | amTimeAgo}}"> <a ng-if="c.actions.sign" tooltip-popup-delay="1000" tooltip="Signed {{c.actions.sign | amTimeAgo}}">
<i class="fi-check icon-status icon-active-check"></i> <i class="fi-check icon-status icon-active-check"></i>
</a> </a>
<a ng-if="!c.actions.sign && !c.actions.rejected && tx.missingSignatures" class="icon-status"> <a ng-if="!c.actions.sign && !c.actions.rejected && tx.missingSignatures" class="icon-status">
<i class="fi-loop icon-rotate"></i> <i class="fi-loop icon-rotate"></i>
</a> </a>
</div> </div>
@ -100,7 +99,7 @@
</div> </div>
<div ng-show="!tx.missingSignatures && tx.sentTs"> <div ng-show="!tx.missingSignatures && tx.sentTs">
<div class="is-valid m10b"> <div class="is-valid m10b">
<strong translate>Sent</strong> <span class="text-gray" am-time-ago="tx.sentTs"></span> <strong translate>Sent</strong> <span class="text-gray" am-time-ago="tx.sentTs"></span>
</div> </div>
<div class="ellipsis small"> <div class="ellipsis small">
<span translate>Transaction ID</span>: <span translate>Transaction ID</span>:
@ -110,12 +109,12 @@
</div> </div>
</div> </div>
<p translate class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures==1"> <p translate class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures==1">
One signature missing One signature missing
</p> </p>
<p translate class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures>1"> <p translate class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures>1">
{{tx.missingSignatures}} signatures missing</p> {{tx.missingSignatures}} signatures missing</p>
<div class="ellipsis small text-gray"> <div class="ellipsis small text-gray">
<strong translate>Fee</strong>: {{tx.fee|noFractionNumber}} {{$root.unitName}} <strong translate>Fee</strong>: {{tx.fee|noFractionNumber}} {{$root.wallet.settings.unitName}}
<strong translate>Proposal ID</strong>: {{tx.ntxid}} <strong translate>Proposal ID</strong>: {{tx.ntxid}}
</div> </div>
</div> </div>

View file

@ -7,7 +7,7 @@
<i class="fi-bitcoin-circle icon-rotate spinner"></i> <i class="fi-bitcoin-circle icon-rotate spinner"></i>
</span> </span>
<p class="m15b" ng-if="!$root.updatingBalance"> <p class="m15b" ng-if="!$root.updatingBalance">
{{address.balance || 0|noFractionNumber}} {{$root.unitName}} {{address.balance || 0|noFractionNumber}} {{$root.wallet.settings.unitName}}
</p> </p>
<button class="m15t button secondary" open-external address="{{address.address}}"> <button class="m15t button secondary" open-external address="{{address.address}}">
<i class="fi-link">&nbsp;</i> <span translate>Open in external application</span> <i class="fi-link">&nbsp;</i> <span translate>Open in external application</span>

View file

@ -77,11 +77,11 @@
<a class="small input-note" title="{{'Send all funds'|translate}}" <a class="small input-note" title="{{'Send all funds'|translate}}"
ng-show="$root.availableBalance > 0 && (!$root.merchant || +$root.merchant.total === 0)" ng-show="$root.availableBalance > 0 && (!$root.merchant || +$root.merchant.total === 0)"
ng-click="topAmount(sendForm)"> ng-click="topAmount(sendForm)">
<span translate>Use all funds</span> ({{getAvailableAmount()}} {{$root.unitName}}) <span translate>Use all funds</span> ({{getAvailableAmount()}} {{$root.wallet.settings.unitName}})
</a> </a>
</div> </div>
<div class="small-3 columns"> <div class="small-3 columns">
<span class="postfix">{{$root.unitName}}</span> <span class="postfix">{{$root.wallet.settings.unitName}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -138,13 +138,13 @@
</p> </p>
<h6 translate>Total amount for this transaction:</h6> <h6 translate>Total amount for this transaction:</h6>
<p class="text-gray" ng-class="{'hidden': sendForm.amount.$invalid || !amount > 0}"> <p class="text-gray" ng-class="{'hidden': sendForm.amount.$invalid || !amount > 0}">
<b>{{amount + defaultFee |noFractionNumber}}</b> {{$root.unitName}} <b>{{amount + defaultFee |noFractionNumber}}</b> {{$root.wallet.settings.unitName}}
<small ng-if="isRateAvailable"> <small ng-if="isRateAvailable">
{{ rateService.toFiat((amount + defaultFee) * unitToSatoshi, alternativeIsoCode) | noFractionNumber: 2 }} {{ alternativeIsoCode }} {{ rateService.toFiat((amount + defaultFee) * unitToSatoshi, alternativeIsoCode) | noFractionNumber: 2 }} {{ alternativeIsoCode }}
<br> <br>
</small> </small>
<small> <small>
<span translate>Including fee of</span> {{defaultFee|noFractionNumber}} {{$root.unitName}} <span translate>Including fee of</span> {{defaultFee|noFractionNumber}} {{$root.wallet.settings.unitName}}
</small> </small>
</p> </p>
<div ng-show="wallet.isShared()"> <div ng-show="wallet.isShared()">

View file

@ -7,7 +7,8 @@
<div class="last-transactions" ng-repeat="tx in txs | paged"> <div class="last-transactions" ng-repeat="tx in txs | paged">
<div ng-include="'views/includes/transaction.html'"></div> <div ng-include="'views/includes/transaction.html'"></div>
</div> </div>
<p ng-show="txs.length == 0"><span translate>No transactions proposals yet.</span></p> <p ng-show="txs.length == 0"><span translate>No transactions proposals yet.</span>
</p>
<pagination ng-show="txs.length > txpItemsPerPage" total-items="txs.length" items-per-page="txpItemsPerPage" page="txpCurrentPage" on-select-page="show()" class="pagination-small primary"></pagination> <pagination ng-show="txs.length > txpItemsPerPage" total-items="txs.length" items-per-page="txpItemsPerPage" page="txpCurrentPage" on-select-page="show()" class="pagination-small primary"></pagination>
</div> </div>
@ -20,10 +21,8 @@
<div class="large-12"> <div class="large-12">
<div class="m10b size-12" ng-hide="wallet.totalCopayers == 1"> <div class="m10b size-12" ng-hide="wallet.totalCopayers == 1">
<a class="text-gray active" ng-click="toogleLast()" <a class="text-gray active" ng-click="toogleLast()" ng-disabled="loading" loading="Updating" ng-hide="lastShowed && !loading">[ <span translate>Show</span> ]</a>
ng-disabled="loading" loading="Updating" ng-hide="lastShowed && !loading">[ <span translate>Show</span> ]</a> <a class="text-gray" ng-click="toogleLast()" ng-disabled="loading" loading="Updating" ng-show="lastShowed && !loading">[ <span translate>Hide</span> ]</a>
<a class="text-gray" ng-click="toogleLast()" ng-disabled="loading"
loading="Updating" ng-show="lastShowed && !loading">[ <span translate>Hide</span> ]</a>
</div> </div>
<div class="btransactions" ng-if="lastShowed"> <div class="btransactions" ng-if="lastShowed">
@ -52,9 +51,9 @@
<div class="last-transactions-content"> <div class="last-transactions-content">
<div class="large-5 medium-5 small-12 columns"> <div class="large-5 medium-5 small-12 columns">
<div ng-repeat="vin in btx.vinSimple"> <div ng-repeat="vin in btx.vinSimple">
<small class="right m5t">{{vin.value| noFractionNumber}} {{$root.unitName}}</small> <small class="right m5t">{{vin.value| noFractionNumber}} {{$root.wallet.settings.unitName}}</small>
<p class="ellipsis text-gray size-12"> <p class="ellipsis text-gray size-12">
<contact address="{{vin.addr}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/> <contact address="{{vin.addr}}" tooltip-popup-delay="500" tooltip tooltip-placement="right" />
</p> </p>
</div> </div>
</div> </div>
@ -66,20 +65,20 @@
</div> </div>
<div class="large-6 medium-6 small-12 columns"> <div class="large-6 medium-6 small-12 columns">
<div ng-repeat="vout in btx.voutSimple"> <div ng-repeat="vout in btx.voutSimple">
<small class="right m5t">{{vout.value| noFractionNumber}} {{$root.unitName}}</small> <small class="right m5t">{{vout.value| noFractionNumber}} {{$root.wallet.settings.unitName}}</small>
<p class="ellipsis text-gray size-12"> <p class="ellipsis text-gray size-12">
<contact address="{{vout.addr}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/> <contact address="{{vout.addr}}" tooltip-popup-delay="500" tooltip tooltip-placement="right" />
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<div class="last-transactions-footer"> <div class="last-transactions-footer">
<div class="large-6 medium-6 small-6 columns"> <div class="large-6 medium-6 small-6 columns">
<p class="size-12"><span translate>Fee</span>: {{btx.fees | noFractionNumber}} {{$root.unitName}}</p> <p class="size-12"><span translate>Fee</span>: {{btx.fees | noFractionNumber}} {{$root.wallet.settings.unitName}}</p>
<p class="size-12"><span translate>Confirmations</span>: {{btx.confirmations || 0}}</p> <p class="size-12"><span translate>Confirmations</span>: {{btx.confirmations || 0}}</p>
</div> </div>
<div class="large-6 medium-6 small-6 columns text-right"> <div class="large-6 medium-6 small-6 columns text-right">
<p class="label size-14"><span translate>Total</span>: {{btx.valueOut| noFractionNumber}} {{$root.unitName}}</p> <p class="label size-14"><span translate>Total</span>: {{btx.valueOut| noFractionNumber}} {{$root.wallet.settings.unitName}}</p>
</div> </div>
</div> </div>
</div> </div>
@ -87,4 +86,3 @@
</div> </div>
</div> </div>
</div> </div>