Check tx proposal minimum amount
This commit is contained in:
parent
cfc284af75
commit
ce910fe52f
5 changed files with 24 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
var satToUnit = 1 / config.unitToSatoshi;
|
||||
$scope.defaultFee = bitcore.TransactionBuilder.FEE_PER_1000B_SAT * satToUnit;
|
||||
$scope.unitToBtc = config.unitToSatoshi / bitcore.util.COIN;
|
||||
$scope.minAmount = config.limits.minAmountSatoshi * satToUnit;
|
||||
|
||||
$scope.loadTxs = function() {
|
||||
var opts = {
|
||||
|
|
|
|||
|
|
@ -1534,6 +1534,7 @@ Wallet.prototype.createTxSync = function(toAddress, amountSatStr, comment, utxos
|
|||
preconditions.checkArgument(new Address(toAddress).network().name === this.getNetworkName(), 'networkname mismatch');
|
||||
preconditions.checkState(pkr.isComplete(), 'pubkey ring incomplete');
|
||||
preconditions.checkState(priv, 'no private key');
|
||||
preconditions.checkArgument(bignum(amountSatStr, 10).cmp(copayConfig.limits.minAmountSatoshi) >= 0, 'invalid amount');
|
||||
if (comment) preconditions.checkArgument(comment.length <= 100);
|
||||
|
||||
if (!opts.remainderOut) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue