+
-
+
No transaction or address found :(
+
-
diff --git a/tangle-explorer-web/src/utils/iota-search-engine.js b/tangle-explorer-web/src/utils/iota-search-engine.js
index c21d008..9ce8f64 100644
--- a/tangle-explorer-web/src/utils/iota-search-engine.js
+++ b/tangle-explorer-web/src/utils/iota-search-engine.js
@@ -2,7 +2,17 @@ require('@/lib/iota')
const iotaNode = require("@/utils/iota-node")
const _ = require('lodash')
-module.exports = (val, callbackTxs, callbackAddresses, callbackBundles) => {
+module.exports = (val, callbackTxs, callbackAddresses, callbackBundles, fullyDone) => {
+ var callbackStack = 3
+ var callbackCheck = () => {
+ callbackStack--
+ if(callbackStack === 0) {
+ if(fullyDone !== undefined) {
+ fullyDone()
+ }
+ }
+ }
+
iotaNode.iota.api.getBalances([val], 20, function(e, r) {
if(r !== undefined) {
var balance = parseInt(r.balances[0])
@@ -13,13 +23,17 @@ module.exports = (val, callbackTxs, callbackAddresses, callbackBundles) => {
balance: balance
}])
}
+ callbackCheck()
})
+ } else {
+ callbackCheck()
}
})
iotaNode.iota.api.getTransactionsObjects([val], function(e, r) {
callbackTxs(_.filter(r, (tx) => {
return tx.hash !== '999999999999999999999999999999999999999999999999999999999999999999999999999999999'
}))
+ callbackCheck()
})
iotaNode.iota.api.findTransactionObjects({ bundles: [val] }, function(e, r) {
if(r !== undefined && r.length > 0) {
@@ -27,5 +41,6 @@ module.exports = (val, callbackTxs, callbackAddresses, callbackBundles) => {
hash: r[0].bundle
}])
}
+ callbackCheck()
})
}