@yerofey/cryptowallet-cli 1.18.0 → 1.18.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yerofey/cryptowallet-cli",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "description": "Crypto wallet generator CLI tool",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/yerofey/cryptowallet-cli",
package/src/Method.js CHANGED
@@ -93,7 +93,7 @@ class Method {
93
93
 
94
94
  const cw = await new CW(chain, options).init();
95
95
 
96
- const startsWithSymbols = cw.row.startsWith.split('|') || [];
96
+ const startsWithSymbols = cw.row.startsWith.split('|') || [''];
97
97
 
98
98
  let chainFullName =
99
99
  (cw.row.name || chain) +
@@ -193,8 +193,9 @@ class Method {
193
193
  log(`📄 ${cw.wallet.mnemonic}`);
194
194
  linesCount += 1;
195
195
  }
196
- // addresses
196
+
197
197
  if (displayAsText) {
198
+ // display addresses
198
199
  for (const item of cw.wallet.addresses) {
199
200
  if (cw.wallet.addresses.length > 1) {
200
201
  log();
@@ -245,7 +246,7 @@ class Method {
245
246
  const addressStartingSymbol = startsWithSymbols.filter((symbol) =>
246
247
  item.address.startsWith(symbol)
247
248
  )[0];
248
- const addressCutPrefixLength = addressStartingSymbol.length;
249
+ const addressCutPrefixLength = addressStartingSymbol.length || 0;
249
250
  const addressHighlightedPart = item.address.substring(
250
251
  addressCutPrefixLength + cw.options.prefix.length,
251
252
  cw.options.prefix.length
@@ -278,6 +279,16 @@ class Method {
278
279
  log(`🔑 ${item.privateKey}`);
279
280
  }
280
281
  }
282
+
283
+ // tested
284
+ if (cw.wallet.tested !== undefined && cw.wallet.tested == false) {
285
+ log();
286
+ log(
287
+ red(
288
+ '‼️ This wallet generation method is not tested yet, use it at your own risk'
289
+ )
290
+ );
291
+ }
281
292
  } else {
282
293
  outputData.wallets = cw.wallet.addresses;
283
294
  }
@@ -356,15 +367,6 @@ class Method {
356
367
  log();
357
368
  }
358
369
 
359
- // tested
360
- if (cw.wallet.tested !== undefined && cw.wallet.tested == false) {
361
- log(
362
- red(
363
- '‼️ This wallet generation format was not tested yet, do not use it!'
364
- )
365
- );
366
- }
367
-
368
370
  // formats
369
371
  if (
370
372
  cw.row.formats !== undefined &&
@@ -4,5 +4,6 @@
4
4
  "startsWith": "",
5
5
  "prefixTest": "[1-9a-zA-Z]",
6
6
  "apps": ["phantom", "trustwallet"],
7
- "flags": ["p", "s"]
7
+ "flags": ["p", "s"],
8
+ "tested": false
8
9
  }