mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-16 23:02:13 +11:00
testing again
This commit is contained in:
parent
2b025c54d7
commit
ffbb611999
1 changed files with 7 additions and 8 deletions
15
index.js
15
index.js
|
|
@ -162,12 +162,12 @@ fastify.get(
|
|||
let graphdata = []
|
||||
if(log.body != "null"){
|
||||
log = JSON.parse(log.body);
|
||||
console.log(log)
|
||||
log = log.reverse()
|
||||
let graphlog = log;
|
||||
if (graphlog != null) {
|
||||
graphlog = graphlog.reverse();
|
||||
//graphlog = graphlog.reverse();
|
||||
}
|
||||
console.log(graphlog)
|
||||
console.log("here fuckwit")
|
||||
|
||||
|
||||
|
||||
|
|
@ -180,12 +180,12 @@ fastify.get(
|
|||
for (i = 0; i < graphlog.length; i++) {
|
||||
|
||||
if(graphlog[i].amount >= 0 ){
|
||||
currentbal = (parseInt(graphlog[i].amount)) + parseInt(currentbal);
|
||||
currentbal = parseInt(currentbal) + (parseInt(graphlog[i].amount));
|
||||
if( i > 14)
|
||||
break
|
||||
graphdata.push([i+1, currentbal])
|
||||
} else{
|
||||
currentbal = (parseInt(graphlog[i].amount)) + parseInt(currentbal);
|
||||
currentbal = parseInt(currentbal) + (parseInt(graphlog[i].amount));
|
||||
if( i > 14)
|
||||
break
|
||||
graphdata.push([i+1, currentbal])
|
||||
|
|
@ -204,12 +204,11 @@ fastify.get(
|
|||
|
||||
|
||||
for(i = 0; i < log.length; i++){
|
||||
console.log(log[i])
|
||||
|
||||
|
||||
if(log[i].amount < 0){
|
||||
let absol = Math.abs(log[i].amount)
|
||||
console.log(absol)
|
||||
let date = new Date(log[i].time * 1000)
|
||||
console.log(date)
|
||||
transactionlog.push(`You sent ${log[i].counterparty} ${absol} at ${date}`);
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue