paypro: total now working.

This commit is contained in:
Christopher Jeffrey 2014-07-31 17:01:35 -07:00 committed by Manuel Araoz
parent d94e8525fd
commit feaa71c951
1 changed files with 13 additions and 2 deletions

View File

@ -34,14 +34,25 @@ angular.module('copayApp.directives')
});
}
// XXX good
// total = bignum
// .fromBuffer(total, {
// endian: 'little',
// size: 1
// })
// .div(config.unitToSatoshi)
// .toString(10);
total = bignum
.fromBuffer(total, {
endian: 'little',
size: 1
})
.div(config.unitToSatoshi)
.toString(10);
// XXX bad
total = +total / config.unitToSatoshi;
var amount = angular.element(
document.querySelector('input#amount'));
amount.val(total);
@ -60,7 +71,7 @@ angular.module('copayApp.directives')
tamount.html(total + ' (CA: ' + ca
+ '. Expires: '
+ expires.toISOString()
+ '): ' + memo);
+ ')');
var submit = angular.element(
document.querySelector('button[type=submit]'));