use new fee level only for the current transaction created

This commit is contained in:
Gabriel Bazán 2017-05-19 10:59:36 -03:00
commit 6521bbdcb4
9 changed files with 147 additions and 96 deletions

View file

@ -60,7 +60,7 @@ 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.getCurrentFeeValue('livenet', function(err, feePerKB) {
feeService.getCurrentFeeValue('livenet', null, function(err, feePerKB) {
var opts = {};
opts.fee = Math.round((feePerKB * rawTxLength) / 2000);
$scope.wallet.buildTxFromPrivateKey($scope.privateKey, destinationAddress, opts, function(err, tx) {