mirror of https://github.com/BTCPrivate/copay.git
Add dollar balance to sidebar
This commit is contained in:
parent
d3f48661e1
commit
54b3482b1f
|
@ -2,7 +2,7 @@
|
||||||
var bitcore = require('bitcore');
|
var bitcore = require('bitcore');
|
||||||
|
|
||||||
angular.module('copayApp.services')
|
angular.module('copayApp.services')
|
||||||
.factory('controllerUtils', function($rootScope, $sce, $location, notification, $timeout, video, uriHandler) {
|
.factory('controllerUtils', function($rootScope, $sce, $location, notification, $timeout, video, uriHandler, rateService) {
|
||||||
var root = {};
|
var root = {};
|
||||||
root.getVideoMutedStatus = function(copayer) {
|
root.getVideoMutedStatus = function(copayer) {
|
||||||
if (!$rootScope.videoInfo) return;
|
if (!$rootScope.videoInfo) return;
|
||||||
|
@ -217,7 +217,15 @@ angular.module('copayApp.services')
|
||||||
$rootScope.balanceByAddr = balanceByAddr;
|
$rootScope.balanceByAddr = balanceByAddr;
|
||||||
root.updateAddressList();
|
root.updateAddressList();
|
||||||
$rootScope.updatingBalance = false;
|
$rootScope.updatingBalance = false;
|
||||||
return cb ? cb() : null;
|
|
||||||
|
rateService.whenAvailable(function() {
|
||||||
|
$rootScope.totalBalanceAlternative = rateService.toFiat(balanceSat, config.alternativeIsoCode);
|
||||||
|
$rootScope.alternativeIsoCode = config.alternativeIsoCode;
|
||||||
|
$rootScope.lockedBalanceAlternative = rateService.toFiat(balanceSat - safeBalanceSat, config.alternativeIsoCode);
|
||||||
|
|
||||||
|
|
||||||
|
return cb ? cb() : null;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,9 @@
|
||||||
class="has-tip"
|
class="has-tip"
|
||||||
data-options="disable_for_touch:true"
|
data-options="disable_for_touch:true"
|
||||||
tooltip-popup-delay='500'
|
tooltip-popup-delay='500'
|
||||||
tooltip="{{totalBalanceBTC |noFractionNumber:8}} BTC"
|
tooltip="{{totalBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}}"
|
||||||
tooltip-trigger="mouseenter"
|
tooltip-trigger="mouseenter"
|
||||||
tooltip-placement="bottom">{{totalBalance || 0
|
tooltip-placement="bottom">{{totalBalance || 0 |noFractionNumber}} {{$root.unitName}}
|
||||||
|noFractionNumber}} {{$root.unitName}}
|
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
Locked
|
Locked
|
||||||
|
@ -38,7 +37,7 @@
|
||||||
class="has-tip"
|
class="has-tip"
|
||||||
data-options="disable_for_touch:true"
|
data-options="disable_for_touch:true"
|
||||||
tooltip-popup-delay='500'
|
tooltip-popup-delay='500'
|
||||||
tooltip="{{lockedBalanceBTC |noFractionNumber:8}} BTC"
|
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.unitName}}
|
||||||
</span> <i class="fi-info medium" tooltip="Balance locked in pending transaction proposals" tooltip-placement="bottom"></i>
|
</span> <i class="fi-info medium" tooltip="Balance locked in pending transaction proposals" tooltip-placement="bottom"></i>
|
||||||
|
|
Loading…
Reference in New Issue