Commit 3ccee508 authored by bitsoko services's avatar bitsoko services 👷🏿

Update transactionsManager.js

parent 0904183d
......@@ -2,7 +2,7 @@
async function editTran(id,status,price,code,high,low){
async function editTran(id,conf,price,code,high,low,type){
//status codes
//["opening","trading","closing","expiring"]
......@@ -68,15 +68,15 @@ const template = document.createElement('template');
'<span class="sub sub-date">08 Jul, 18 10:20PM</span>'+
'</td>'+
'<td class="data-col dt-type">'+
'<span class="dt-type-md badge badge-outline badge-warning badge-md">FUTURE</span>'+
'<span class="dt-type-sm badge badge-sq badge-outline badge-warning badge-md">FT</span>'+
'<span class="dt-type-md badge badge-outline badge-warning badge-md">'+type+'</span>'+
'<span class="dt-type-sm badge badge-sq badge-outline badge-warning badge-md">'+type+'</span>'+
'</td>'+
'<td class="data-col text-right">'+
'<ul class="data-action-list d-none d-md-inline-flex">'+
'<li>'+
'<a href="#" class="btn btn-auto btn-primary btn-xs">'+
'<span>'+
'etherscan <span class="d-none d-xl-inline-block">Now</span>'+
'confirmations <span class="d-none d-xl-inline-block">'+conf+'</span>'+
'</span>'+
'<em class="ti ti-wallet"></em>'+
'</a>'+
......@@ -103,13 +103,27 @@ const template = document.createElement('template');
for(var i in cList){
var editedTran= await editTran(cList[i].hash,'trading',1280,'egg-03e-367223',1340,1290);
var editedTran= await editTran(cList[i].hash,'5',1280,'egg-03e-367223',1340,1290,'contract');
transHolder.appendChild(editedTran);
}
var data = await fetch('https://api.etherscan.io/api?module=account&action=txlist&address=0x8d9626315e8025b81c3bdb926db4c51dde237f52&apikey=Q1VDCIGKZK189XPMT8W8EX7QUH166U94PK');
var transHolder=document.querySelector('#transactions-holder');
var res = await data.json()
var cList=res.result;
for(var i in cList){
var editedTran= await editTran(cList[i].hash,'5',1280,'egg-03e-367223',1340,1290,'token');
transHolder.appendChild(editedTran);
}
}
addTrans();
\ No newline at end of file
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