Comparing version 2.2.6 to 2.2.7
{ | ||
"name": "tronweb", | ||
"version": "2.2.6", | ||
"version": "2.2.7", | ||
"description": "JavaScript SDK that encapsulates the TRON Node HTTP API", | ||
@@ -5,0 +5,0 @@ "main": "dist/TronWeb.node.js", |
@@ -292,3 +292,4 @@ import utils from 'utils'; | ||
eventName: this.name, | ||
sort: 'block_timestamp' | ||
sort: 'block_timestamp', | ||
size: 50 | ||
}); | ||
@@ -298,7 +299,16 @@ const [latestEvent] = events.sort((a, b) => b.block - a.block); | ||
if(options.resourceNode) { | ||
if (/full/.test(options.resourceNode)) { | ||
if ((event.resourceNode && !/full/.test(event.resourceNode)) | ||
|| !event._unconfirmed) { | ||
return false | ||
} | ||
} else { | ||
if ((event.resourceNode && !/solidity/.test(event.resourceNode)) | ||
|| event._unconfirmed) { | ||
return false | ||
} | ||
} | ||
} | ||
// TODO use unconfirmed | ||
if(options.resourceNode && !RegExp(options.resourceNode, 'i').test(event.resourceNode)) | ||
return false; | ||
const duplicate = events.slice(0, index).some(priorEvent => ( | ||
@@ -324,2 +334,3 @@ JSON.stringify(priorEvent) == JSON.stringify(event) | ||
} | ||
}; | ||
@@ -326,0 +337,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
3514477
7855