mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 23:52:14 +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 = []
|
let graphdata = []
|
||||||
if(log.body != "null"){
|
if(log.body != "null"){
|
||||||
log = JSON.parse(log.body);
|
log = JSON.parse(log.body);
|
||||||
|
console.log(log)
|
||||||
|
log = log.reverse()
|
||||||
let graphlog = log;
|
let graphlog = log;
|
||||||
if (graphlog != null) {
|
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++) {
|
for (i = 0; i < graphlog.length; i++) {
|
||||||
|
|
||||||
if(graphlog[i].amount >= 0 ){
|
if(graphlog[i].amount >= 0 ){
|
||||||
currentbal = (parseInt(graphlog[i].amount)) + parseInt(currentbal);
|
currentbal = parseInt(currentbal) + (parseInt(graphlog[i].amount));
|
||||||
if( i > 14)
|
if( i > 14)
|
||||||
break
|
break
|
||||||
graphdata.push([i+1, currentbal])
|
graphdata.push([i+1, currentbal])
|
||||||
} else{
|
} else{
|
||||||
currentbal = (parseInt(graphlog[i].amount)) + parseInt(currentbal);
|
currentbal = parseInt(currentbal) + (parseInt(graphlog[i].amount));
|
||||||
if( i > 14)
|
if( i > 14)
|
||||||
break
|
break
|
||||||
graphdata.push([i+1, currentbal])
|
graphdata.push([i+1, currentbal])
|
||||||
|
|
@ -204,12 +204,11 @@ fastify.get(
|
||||||
|
|
||||||
|
|
||||||
for(i = 0; i < log.length; i++){
|
for(i = 0; i < log.length; i++){
|
||||||
console.log(log[i])
|
|
||||||
|
|
||||||
if(log[i].amount < 0){
|
if(log[i].amount < 0){
|
||||||
let absol = Math.abs(log[i].amount)
|
let absol = Math.abs(log[i].amount)
|
||||||
console.log(absol)
|
|
||||||
let date = new Date(log[i].time * 1000)
|
let date = new Date(log[i].time * 1000)
|
||||||
console.log(date)
|
|
||||||
transactionlog.push(`You sent ${log[i].counterparty} ${absol} at ${date}`);
|
transactionlog.push(`You sent ${log[i].counterparty} ${absol} at ${date}`);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue