paypro: total now working.
This commit is contained in:
parent
d94e8525fd
commit
feaa71c951
1 changed files with 13 additions and 2 deletions
|
|
@ -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
|
total = bignum
|
||||||
.fromBuffer(total, {
|
.fromBuffer(total, {
|
||||||
endian: 'little',
|
endian: 'little',
|
||||||
size: 1
|
size: 1
|
||||||
})
|
})
|
||||||
.div(config.unitToSatoshi)
|
|
||||||
.toString(10);
|
.toString(10);
|
||||||
|
|
||||||
|
// XXX bad
|
||||||
|
total = +total / config.unitToSatoshi;
|
||||||
|
|
||||||
var amount = angular.element(
|
var amount = angular.element(
|
||||||
document.querySelector('input#amount'));
|
document.querySelector('input#amount'));
|
||||||
amount.val(total);
|
amount.val(total);
|
||||||
|
|
@ -60,7 +71,7 @@ angular.module('copayApp.directives')
|
||||||
tamount.html(total + ' (CA: ' + ca
|
tamount.html(total + ' (CA: ' + ca
|
||||||
+ '. Expires: '
|
+ '. Expires: '
|
||||||
+ expires.toISOString()
|
+ expires.toISOString()
|
||||||
+ '): ' + memo);
|
+ ')');
|
||||||
|
|
||||||
var submit = angular.element(
|
var submit = angular.element(
|
||||||
document.querySelector('button[type=submit]'));
|
document.querySelector('button[type=submit]'));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue