set send max
This commit is contained in:
parent
e8e26b4de8
commit
1687669149
11 changed files with 249 additions and 171 deletions
|
|
@ -562,20 +562,13 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
if (lodash.isEmpty(txp) || lodash.isEmpty(wallet))
|
||||
return cb('MISSING_PARAMETER');
|
||||
|
||||
if (txp.sendMax) {
|
||||
wallet.createTxProposal(txp, function(err, createdTxp) {
|
||||
if (err) return cb(err);
|
||||
else return cb(null, createdTxp);
|
||||
});
|
||||
} else {
|
||||
wallet.createTxProposal(txp, function(err, createdTxp) {
|
||||
if (err) return cb(err);
|
||||
else {
|
||||
$log.debug('Transaction created');
|
||||
return cb(null, createdTxp);
|
||||
}
|
||||
});
|
||||
}
|
||||
wallet.createTxProposal(txp, function(err, createdTxp) {
|
||||
if (err) return cb(err);
|
||||
else {
|
||||
$log.debug('Transaction created');
|
||||
return cb(null, createdTxp);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
root.publishTx = function(wallet, txp, cb) {
|
||||
|
|
@ -1086,8 +1079,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
root.getSendMaxInfo = function(wallet, opts, cb) {
|
||||
opts = opts || {};
|
||||
wallet.getSendMaxInfo(opts, function(err, res) {
|
||||
if (err) return cb(err);
|
||||
return cb(null, res);
|
||||
return cb(err, res);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue