Fix for the transactions
Using explorer instead of richlist
This commit is contained in:
@@ -106,7 +106,7 @@
|
|||||||
<button class="aboutbutton ui inverted blue button" type="button" onclick="require('electron').shell.openExternal('https://t.me/Ether_1')">Telegram</button>
|
<button class="aboutbutton ui inverted blue button" type="button" onclick="require('electron').shell.openExternal('https://t.me/Ether_1')">Telegram</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button class="aboutbutton ui inverted blue button" type="button" onclick="require('electron').shell.openExternal('https://t.me/Ether1News')">News</button>
|
<button class="aboutbutton ui inverted blue button" type="button" onclick="require('electron').shell.openExternal('https://ethoprotocol.com/blog/')">News Blog</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button class="aboutbutton ui inverted blue button" type="button" onclick="require('electron').shell.openExternal('mailto:admin@ethoprotocol.com')">Email</button>
|
<button class="aboutbutton ui inverted blue button" type="button" onclick="require('electron').shell.openExternal('mailto:admin@ethoprotocol.com')">Email</button>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const {ipcRenderer} = require("electron");
|
const {ipcRenderer} = require("electron");
|
||||||
|
const moment = require("moment");
|
||||||
|
|
||||||
class Transactions {
|
class Transactions {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -46,19 +47,22 @@ class Transactions {
|
|||||||
lastBlock
|
lastBlock
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$.getJSON("https://richlist.ethoprotocol.com/transactions_list.php" + params, function (result) {
|
$.getJSON("https://explorer1.ethoprotocol.com/api?module=account&action=txlist&address=" + addressList[counter].toLowerCase(), function (result) {
|
||||||
result.data.forEach(element => {
|
|
||||||
if (element.fromaddr && element.toaddr) {
|
if (result.result) {
|
||||||
ipcRenderer.send("storeTransaction", {
|
result.result.forEach(element => {
|
||||||
block: element.block.toString(),
|
if (element.from && element.to && startBlock <= parseInt(element.blockNumber) && lastBlock >= parseInt(element.blockNumber)) {
|
||||||
txhash: element.txhash.toLowerCase(),
|
ipcRenderer.send("storeTransaction", {
|
||||||
fromaddr: element.fromaddr.toLowerCase(),
|
block: element.blockNumber.toString(),
|
||||||
timestamp: element.timestamp,
|
txhash: element.hash.toLowerCase(),
|
||||||
toaddr: element.toaddr.toLowerCase(),
|
fromaddr: element.from.toLowerCase(),
|
||||||
value: element.value
|
timestamp: moment.unix(parseInt(element.timeStamp)).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
toaddr: element.to.toLowerCase(),
|
||||||
|
value: element.value
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
// call the transaction sync for the next address
|
// call the transaction sync for the next address
|
||||||
EthoTransactions.syncTransactionsForSingleAddress(addressList, counters, lastBlock, counter + 1);
|
EthoTransactions.syncTransactionsForSingleAddress(addressList, counters, lastBlock, counter + 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user