Merge pull request #1716 from matiaspando/iss1700

Replaced a call to a function for a variable
This commit is contained in:
Matias Alejo Garcia 2014-11-04 13:08:47 -03:00
commit e59fc26f0d
4 changed files with 11 additions and 11 deletions

View file

@ -6,6 +6,7 @@ angular.module('copayApp.controllers').controller('CopayersController',
$rootScope.title = 'Waiting copayers for ' + $rootScope.wallet.getName(); $rootScope.title = 'Waiting copayers for ' + $rootScope.wallet.getName();
} }
$scope.loading = false; $scope.loading = false;
$scope.secret = $rootScope.wallet.getSecret();
$scope.goToWallet = function() { $scope.goToWallet = function() {
controllerUtils.updateAddressList(); controllerUtils.updateAddressList();

View file

@ -31,7 +31,7 @@ var Insight = module.exports.Insight = require('./Insight');
var copayConfig = require('../../config'); var copayConfig = require('../../config');
var TX_MAX_SIZE_KB = 50; var TX_MAX_SIZE_KB = 50;
var TX_MAX_INS = 70; var TX_MAX_INS = 70;
/** /**
* @desc * @desc
* Wallet manages a private key for Copay, network, storage of the wallet for * Wallet manages a private key for Copay, network, storage of the wallet for
@ -1384,7 +1384,7 @@ Wallet.prototype.sendTx = function(ntxid, cb) {
var self = this; var self = this;
this.blockchain.broadcast(txHex, function(err, txid) { this.blockchain.broadcast(txHex, function(err, txid) {
if (err) if (err)
log.error('Error sending TX:',err); log.error('Error sending TX:', err);
if (txid) { if (txid) {
log.debug('Wallet:' + self.getName() + ' Broadcasted TX. BITCOIND txid:', txid); log.debug('Wallet:' + self.getName() + ' Broadcasted TX. BITCOIND txid:', txid);
@ -2160,8 +2160,8 @@ Wallet.prototype.addressIsOwn = function(addrStr, opts) {
*/ */
Wallet.estimatedFee = function(unspentCount) { Wallet.estimatedFee = function(unspentCount) {
preconditions.checkArgument(_.isNumber(unspentCount)); preconditions.checkArgument(_.isNumber(unspentCount));
var estimatedSizeKb = Math.ceil( ( 500 + unspentCount * 250) / 1024 ); var estimatedSizeKb = Math.ceil((500 + unspentCount * 250) / 1024);
return parseInt( estimatedSizeKb * bitcore.TransactionBuilder.FEE_PER_1000B_SAT); return parseInt(estimatedSizeKb * bitcore.TransactionBuilder.FEE_PER_1000B_SAT);
}; };
/** /**
@ -2417,7 +2417,7 @@ Wallet.prototype.createTxSync = function(toAddress, amountSatStr, comment, utxos
var txSize = tx.getSize(); var txSize = tx.getSize();
if (txSize/1024 > TX_MAX_SIZE_KB) if (txSize / 1024 > TX_MAX_SIZE_KB)
throw new Error('BIG: Resulting TX is too big ' + txSize + ' bytes. Aborting'); throw new Error('BIG: Resulting TX is too big ' + txSize + ' bytes. Aborting');

View file

@ -293,7 +293,6 @@ angular.module('copayApp.services')
w = w || $rootScope.wallet; w = w || $rootScope.wallet;
if (!w) return root.onErrorDigest(); if (!w) return root.onErrorDigest();
if (!w.isReady()) return; if (!w.isReady()) return;
console.log('## Updating balance of:' + w.id)
w.balanceInfo = {}; w.balanceInfo = {};
var scope = root.isFocusedWallet(w.id) ? $rootScope : w.balanceInfo; var scope = root.isFocusedWallet(w.id) ? $rootScope : w.balanceInfo;

View file

@ -14,11 +14,11 @@
<small>{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}}</small> <small>{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}}</small>
</h2> </h2>
<div class="text-center"> <div class="text-center">
<qrcode size="250" data="{{$root.wallet.getSecret()}}"></qrcode> <qrcode size="250" data="{{secret}}"></qrcode>
</div> </div>
<div class="secret m20t"> <div class="secret m20t">
{{$root.wallet.getSecret()}} {{secret}}
<span class="btn-copy" clip-copy="$root.wallet.getSecret()"></span> <span class="btn-copy" clip-copy="secret"></span>
</div> </div>
</div> </div>
</div> </div>