hodl-wallet 1.7.0 → 1.7.2

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.
Files changed (3) hide show
  1. package/example.jpg +0 -0
  2. package/index.js +10 -7
  3. package/package.json +2 -2
package/example.jpg CHANGED
Binary file
package/index.js CHANGED
@@ -790,7 +790,7 @@ class UIManager {
790
790
  return key;
791
791
  }
792
792
 
793
- static async confirmEncryptionKey(originalKey) {
793
+ static async confirmEncryptionKey() {
794
794
  const { confirmKey } = await inquirer.prompt({
795
795
  type: 'password',
796
796
  name: 'confirmKey',
@@ -857,7 +857,7 @@ try {
857
857
  const accountExists = await wallet.getMnemonic();
858
858
 
859
859
  if (!accountExists) {
860
- const confirmedKey = await UIManager.confirmEncryptionKey(encryptionKey);
860
+ const confirmedKey = await UIManager.confirmEncryptionKey();
861
861
  if (confirmedKey !== encryptionKey) {
862
862
  Wallet.displayError('Passwords do not match. Please try again.');
863
863
  process.exit(1);
@@ -877,7 +877,7 @@ process.on('exit', () => {
877
877
  UIManager.displayExitPhrase();
878
878
  });
879
879
 
880
- while (true) {
880
+ async function mainMenu() {
881
881
  const { action } = await inquirer.prompt({
882
882
  type: 'list',
883
883
  name: 'action',
@@ -894,17 +894,20 @@ while (true) {
894
894
  switch (action) {
895
895
  case 'transferFunds':
896
896
  await wallet.transferFunds();
897
- break;
897
+ return mainMenu();
898
898
  case 'balance':
899
899
  await wallet.showBalance();
900
- break;
900
+ return mainMenu();
901
901
  case 'showTransactions':
902
902
  await wallet.showTransactions();
903
- break;
903
+ return mainMenu();
904
904
  case 'account':
905
905
  await wallet.loadAccount(true);
906
- break;
906
+ return mainMenu();
907
907
  case 'exit':
908
908
  process.exit();
909
909
  }
910
910
  }
911
+
912
+ // Start the application
913
+ mainMenu();
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "hodl-wallet",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "🧊 HODL Wallet - Fast CLI crypto wallet!",
5
- "author": "Martin Cl6sen",
5
+ "author": "Martin Clasen",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/clasen/HODL.git"