paypro: support user amount decision on 0-value-server-outputs.

This commit is contained in:
Christopher Jeffrey 2014-08-06 10:46:13 -07:00 committed by Manuel Araoz
commit d87697dfed
3 changed files with 39 additions and 1 deletions

View file

@ -62,6 +62,13 @@ angular.module('copayApp.controllers').controller('SendController',
var w = $rootScope.wallet;
function done(ntxid, merchantData) {
if (merchantData && +merchantData.total === 0) {
var txp = w.txProposals.txps[ntxid];
txp.builder.tx.outs[0].v = bitcore.Bignum(amount + '', 10).toBuffer({
endian: 'little',
size: 1
});
}
if (w.isShared()) {
$scope.loading = false;
var message = 'The transaction proposal has been created';