carbon-js-sdk 0.4.16-beta.2 → 0.4.16-beta.3

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.
@@ -40,7 +40,7 @@ export interface MetaMaskSyncResult {
40
40
  }
41
41
  export interface StoredMnemonicInfo {
42
42
  chain: EVMChainV2;
43
- mnemonics: string;
43
+ mnemonicCipher: string;
44
44
  }
45
45
  /**
46
46
  * TODO: Add docs
@@ -506,7 +506,7 @@ class MetaMask {
506
506
  }
507
507
  }));
508
508
  const results = yield Promise.all(chainMnemonicSearch);
509
- return results.find(result => !result);
509
+ return results.find(result => result);
510
510
  });
511
511
  }
512
512
  getMnemonicInfo(connectedBlockchain) {
@@ -514,17 +514,18 @@ class MetaMask {
514
514
  const defaultAccount = yield this.defaultAccount();
515
515
  let result;
516
516
  if (connectedBlockchain !== 'Carbon' && connectedBlockchain) {
517
- yield this.getStoredMnemonicCipher(defaultAccount, connectedBlockchain).then(mnemonics => {
518
- if (mnemonics) {
517
+ yield this.getStoredMnemonicCipher(defaultAccount, connectedBlockchain).then(mnemonicCipher => {
518
+ if (mnemonicCipher) {
519
519
  result = {
520
520
  chain: connectedBlockchain,
521
- mnemonics
521
+ mnemonicCipher
522
522
  };
523
523
  }
524
524
  }).catch(err => {
525
525
  console.error('Unable to retrieve stored mnemonic cipher from ', connectedBlockchain);
526
526
  console.error(err);
527
- }).finally(() => { return result; });
527
+ return result;
528
+ });
528
529
  }
529
530
  return result;
530
531
  });
@@ -462,9 +462,7 @@ class CarbonWallet {
462
462
  if (!this.isAccountNotFoundError(error, address))
463
463
  throw error;
464
464
  }
465
- finally {
466
- return account;
467
- }
465
+ return account;
468
466
  });
469
467
  }
470
468
  reloadAccountSequence() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.4.16-beta.2+dc3aed17",
3
+ "version": "0.4.16-beta.3+3ff73f06",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",