Fix feeRate, sendMax
This commit is contained in:
parent
2e9d279320
commit
ac5a5a9bdc
7 changed files with 13 additions and 17 deletions
|
|
@ -18,14 +18,14 @@ angular.module('copayApp.controllers').controller('feeLevelsController', functio
|
|||
var value = lodash.find($scope.feeLevels[$scope.network], {
|
||||
level: 'superEconomy'
|
||||
});
|
||||
return parseInt((value.feePerKB / 1000).toFixed());
|
||||
return parseInt((value.feePerKb / 1000).toFixed());
|
||||
};
|
||||
|
||||
var getMaxRecommended = function() {
|
||||
var value = lodash.find($scope.feeLevels[$scope.network], {
|
||||
level: 'urgent'
|
||||
});
|
||||
return parseInt((value.feePerKB / 1000).toFixed());
|
||||
return parseInt((value.feePerKb / 1000).toFixed());
|
||||
};
|
||||
|
||||
$scope.ok = function() {
|
||||
|
|
@ -61,7 +61,7 @@ angular.module('copayApp.controllers').controller('feeLevelsController', functio
|
|||
// If no custom fee
|
||||
if (value) {
|
||||
$scope.customFeePerKB = null;
|
||||
$scope.feePerSatByte = (value.feePerKB / 1000).toFixed();
|
||||
$scope.feePerSatByte = (value.feePerKb / 1000).toFixed();
|
||||
$scope.avgConfirmationTime = value.nbBlocks * 10;
|
||||
} else {
|
||||
$scope.avgConfirmationTime = null;
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
|
|||
return;
|
||||
}
|
||||
|
||||
$scope.feePerSatByte = (value.feePerKB / 1000).toFixed();
|
||||
$scope.feePerSatByte = (value.feePerKb / 1000).toFixed();
|
||||
$scope.avgConfirmationTime = value.nbBlocks * 10;
|
||||
$scope.invalidCustomFeeEntered = false;
|
||||
setMinWarning();
|
||||
|
|
@ -97,7 +97,7 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
|
|||
var value = lodash.find($scope.feeLevels[$scope.network], {
|
||||
level: 'superEconomy'
|
||||
});
|
||||
return parseInt((value.feePerKB / 1000).toFixed());
|
||||
return parseInt((value.feePerKb / 1000).toFixed());
|
||||
};
|
||||
|
||||
var setMinWarning = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue