Fix feeRate, sendMax

This commit is contained in:
Gustavo Maximiliano Cortez 2017-08-28 17:17:32 -03:00
commit ac5a5a9bdc
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
7 changed files with 13 additions and 17 deletions

View file

@ -59,9 +59,9 @@ angular.module('copayApp.controllers').controller('paperWalletController',
$scope.wallet.buildTxFromPrivateKey($scope.privateKey, destinationAddress, null, function(err, testTx) {
if (err) return cb(err);
var rawTxLength = testTx.serialize().length;
feeService.getCurrentFeeRate('livenet', function(err, feePerKB) {
feeService.getCurrentFeeRate('livenet', function(err, feePerKb) {
var opts = {};
opts.fee = Math.round((feePerKB * rawTxLength) / 2000);
opts.fee = Math.round((feePerKb * rawTxLength) / 2000);
$scope.wallet.buildTxFromPrivateKey($scope.privateKey, destinationAddress, opts, function(err, tx) {
if (err) return cb(err);
$scope.wallet.broadcastRawTx({