Skip to content
Snippets Groups Projects
Commit f95ee87b authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Fix JS Hint

parent bbbb18f8
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser
resetSources = function(){
data.sources = [];
data.sourcesIndexByKey = {};
};
},
addSource = function(src, sources, sourcesIndexByKey) {
var srcKey = src.type+':'+src.identifier+':'+src.noffset;
......@@ -475,11 +475,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser
tx.uid = uids[tx.pubkey] || null;
});
var txs = data.tx.pendings;
var retry = true;
while(txs && txs.length > 0) {
// process TX pendings
_.forEach(txs, function(tx) {
var processPendingTx = function(tx) {
tx.uid = uids[tx.pubkey] || null;
var consumedSources = [];
......@@ -515,7 +511,13 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser
else {
txErrors.push(tx);
}
});
};
var txs = data.tx.pendings;
var retry = true;
while(txs && txs.length > 0) {
// process TX pendings
_.forEach(txs, processPendingTx);
// Retry once (TX could be chained and processed in a wrong order)
if (txErrors.length > 0 && txPendings.length > 0 && retry) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment