mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #1716 from matiaspando/iss1700
Replaced a call to a function for a variable
This commit is contained in:
commit
e59fc26f0d
|
@ -6,6 +6,7 @@ angular.module('copayApp.controllers').controller('CopayersController',
|
|||
$rootScope.title = 'Waiting copayers for ' + $rootScope.wallet.getName();
|
||||
}
|
||||
$scope.loading = false;
|
||||
$scope.secret = $rootScope.wallet.getSecret();
|
||||
|
||||
$scope.goToWallet = function() {
|
||||
controllerUtils.updateAddressList();
|
||||
|
|
|
@ -31,7 +31,7 @@ var Insight = module.exports.Insight = require('./Insight');
|
|||
var copayConfig = require('../../config');
|
||||
|
||||
var TX_MAX_SIZE_KB = 50;
|
||||
var TX_MAX_INS = 70;
|
||||
var TX_MAX_INS = 70;
|
||||
/**
|
||||
* @desc
|
||||
* 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;
|
||||
this.blockchain.broadcast(txHex, function(err, txid) {
|
||||
if (err)
|
||||
log.error('Error sending TX:',err);
|
||||
log.error('Error sending TX:', err);
|
||||
|
||||
if (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) {
|
||||
preconditions.checkArgument(_.isNumber(unspentCount));
|
||||
var estimatedSizeKb = Math.ceil( ( 500 + unspentCount * 250) / 1024 );
|
||||
return parseInt( estimatedSizeKb * bitcore.TransactionBuilder.FEE_PER_1000B_SAT);
|
||||
var estimatedSizeKb = Math.ceil((500 + unspentCount * 250) / 1024);
|
||||
return parseInt(estimatedSizeKb * bitcore.TransactionBuilder.FEE_PER_1000B_SAT);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2397,7 +2397,7 @@ Wallet.prototype.createTxSync = function(toAddress, amountSatStr, comment, utxos
|
|||
|
||||
if (selectedUtxos.length > TX_MAX_INS)
|
||||
throw new Error('BIG: Resulting TX is too big:' + selectedUtxos.length + ' inputs. Aborting');
|
||||
|
||||
|
||||
|
||||
var inputChainPaths = selectedUtxos.map(function(utxo) {
|
||||
return pkr.pathForAddress(utxo.address);
|
||||
|
@ -2417,9 +2417,9 @@ Wallet.prototype.createTxSync = function(toAddress, amountSatStr, comment, utxos
|
|||
|
||||
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');
|
||||
|
||||
|
||||
|
||||
var me = {};
|
||||
me[myId] = now;
|
||||
|
|
|
@ -293,7 +293,6 @@ angular.module('copayApp.services')
|
|||
w = w || $rootScope.wallet;
|
||||
if (!w) return root.onErrorDigest();
|
||||
if (!w.isReady()) return;
|
||||
console.log('## Updating balance of:' + w.id)
|
||||
|
||||
w.balanceInfo = {};
|
||||
var scope = root.isFocusedWallet(w.id) ? $rootScope : w.balanceInfo;
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
<small>{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}}</small>
|
||||
</h2>
|
||||
<div class="text-center">
|
||||
<qrcode size="250" data="{{$root.wallet.getSecret()}}"></qrcode>
|
||||
<qrcode size="250" data="{{secret}}"></qrcode>
|
||||
</div>
|
||||
<div class="secret m20t">
|
||||
{{$root.wallet.getSecret()}}
|
||||
<span class="btn-copy" clip-copy="$root.wallet.getSecret()"></span>
|
||||
{{secret}}
|
||||
<span class="btn-copy" clip-copy="secret"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue