Commit 5b065895 authored by bitsoko services's avatar bitsoko services 👷🏿

Update transactionsManager.js

parent d7bd2c23
......@@ -2,7 +2,7 @@
async function editTran(id,conf,amount,code,high,low,type){
async function editTran(id,conf,amount,time,high,low,type){
//status codes
//["opening","trading","closing","expiring"]
......@@ -42,8 +42,8 @@ const template = document.createElement('template');
'<span class="d-none">Pending</span>'+
'</div>'+
'<div class="fake-class">'+
'<span class="lead tnx-id">'+id+'</span>'+
'<span class="sub sub-date">2018-08-24 10:45PM</span>'+
'<span class="lead tnx-id" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 90px;">'+id+'</span>'+
'<span class="sub sub-date">'+time+'</span>'+
'</div>'+
'</div>'+
'</td>'+
......@@ -95,10 +95,10 @@ const template = document.createElement('template');
}
async function addTrans(){
var transHolder=document.querySelector('#transactions-holder');
var data = await fetch('https://api.etherscan.io/api?module=account&action=txlist&address=0xEB9cfFf249feF6427bf02881f89eDe58DD8f91BB&apikey=Q1VDCIGKZK189XPMT8W8EX7QUH166U94PK');
var transHolder=document.querySelector('#transactions-holder');
var res = await data.json()
var res = await data.json();
var cList=res.result;
for(var i in cList){
......@@ -112,13 +112,12 @@ const template = document.createElement('template');
var data = await fetch('https://api.etherscan.io/api?module=account&action=tokentx&contractaddress=0x8d9626315e8025b81c3bdb926db4c51dde237f52&page=1&offset=100&sort=asc&apikey=Q1VDCIGKZK189XPMT8W8EX7QUH166U94PK');
var transHolder=document.querySelector('#transactions-holder');
var res = await data.json()
var res = await data.json();
var cList=res.result;
for(var i in cList){
var editedTran= await editTran(cList[i].hash,'5',cList[i].value/Math.pow(10, cList[i].tokenDecimal),'egg-03e-367223',1340,1290,'token');
var editedTran= await editTran(cList[i].hash,'5',cList[i].value/Math.pow(10, cList[i].tokenDecimal),cList[i].timeStamp,1340,1290,'token');
transHolder.appendChild(editedTran);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment