@cityofzion/blockchain-service 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BSAggregator.js +4 -3
- package/dist/functions.js +3 -1
- package/dist/interfaces.d.ts +4 -0
- package/package.json +7 -2
package/dist/BSAggregator.js
CHANGED
|
@@ -55,7 +55,8 @@ class BSAggregator {
|
|
|
55
55
|
const promises = this.blockchainServices.map((service) => __awaiter(this, void 0, void 0, function* () {
|
|
56
56
|
let index = 0;
|
|
57
57
|
const accounts = [];
|
|
58
|
-
|
|
58
|
+
let hasError = false;
|
|
59
|
+
while (!hasError) {
|
|
59
60
|
const generatedAccount = service.generateAccountFromMnemonic(mnemonic, index);
|
|
60
61
|
if (skippedAddresses && skippedAddresses.find(address => address === generatedAccount.address)) {
|
|
61
62
|
index++;
|
|
@@ -67,10 +68,10 @@ class BSAggregator {
|
|
|
67
68
|
address: generatedAccount.address,
|
|
68
69
|
});
|
|
69
70
|
if (!totalCount || totalCount <= 0)
|
|
70
|
-
|
|
71
|
+
hasError = true;
|
|
71
72
|
}
|
|
72
73
|
catch (_a) {
|
|
73
|
-
|
|
74
|
+
hasError = true;
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
accounts.push(generatedAccount);
|
package/dist/functions.js
CHANGED
|
@@ -43,7 +43,9 @@ function waitForTransaction(service, txId) {
|
|
|
43
43
|
yield service.blockchainDataService.getTransaction(txId);
|
|
44
44
|
return true;
|
|
45
45
|
}
|
|
46
|
-
catch (_a) {
|
|
46
|
+
catch (_a) {
|
|
47
|
+
// Empty block
|
|
48
|
+
}
|
|
47
49
|
attempts++;
|
|
48
50
|
yield wait(waitMs);
|
|
49
51
|
} while (attempts < maxAttempts);
|
package/dist/interfaces.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/blockchain-service",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -11,10 +11,15 @@
|
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/node": "~20.2.5",
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
15
|
+
"@typescript-eslint/parser": "^6.5.0",
|
|
16
|
+
"eslint": "^8.48.0",
|
|
14
17
|
"ts-node": "10.9.1",
|
|
15
18
|
"typescript": "4.9.5"
|
|
16
19
|
},
|
|
17
20
|
"scripts": {
|
|
18
|
-
"build": "tsc"
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"lint": "eslint .",
|
|
23
|
+
"format": "eslint --fix"
|
|
19
24
|
}
|
|
20
25
|
}
|