@multiversx/sdk-wallet
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -66,3 +66,7 @@ "use strict"; | ||
static decryptSecretKey(keyFileObject, password) { | ||
// Here, we do not check the "kind" field. Older keystore files (holding only secret keys) do not have this field. | ||
// Here, we check the "kind" field only for files that have it. Older keystore files (holding only secret keys) do not have this field. | ||
const kind = keyFileObject.kind; | ||
if (kind && kind !== UserWalletKind.SecretKey) { | ||
throw new errors_1.Err(`Expected keystore kind to be ${UserWalletKind.SecretKey}, but it was ${kind}.`); | ||
} | ||
const encryptedData = UserWallet.edFromJSON(keyFileObject); | ||
@@ -79,3 +83,3 @@ let text = crypto_1.Decryptor.decrypt(encryptedData, password); | ||
if (keyFileObject.kind != UserWalletKind.Mnemonic) { | ||
throw new errors_1.Err(`Expected kind to be ${UserWalletKind.Mnemonic}, but it was ${keyFileObject.kind}.`); | ||
throw new errors_1.Err(`Expected keystore kind to be ${UserWalletKind.Mnemonic}, but it was ${keyFileObject.kind}.`); | ||
} | ||
@@ -82,0 +86,0 @@ const encryptedData = UserWallet.edFromJSON(keyFileObject); |
{ | ||
"name": "@multiversx/sdk-wallet", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Wallet components for MultiversX", | ||
@@ -12,3 +12,3 @@ "main": "out/index.js", | ||
"test": "mocha", | ||
"compile-browser": "tsc -p tsconfig.json && browserify out/index.js -o out-browser/sdk-wallet.js --standalone multiversxSdkWallet -p esmify", | ||
"compile-browser": "bash ./scripts/compile_browser.sh", | ||
"compile": "tsc -p tsconfig.json", | ||
@@ -45,8 +45,4 @@ "browser-tests": "bash ./scripts/browser_tests.sh", | ||
"assert": "2.0.0", | ||
"axios": "0.26.1", | ||
"babelify": "10.0.0", | ||
"browserify": "17.0.0", | ||
"buffer": "6.0.3", | ||
"chai": "4.2.0", | ||
"esmify": "2.1.1", | ||
"mocha": "9.2.2", | ||
@@ -53,0 +49,0 @@ "ts-node": "9.1.1", |
@@ -21,10 +21,2 @@ # MultiversX SDK for JavaScript and TypeScript: wallet components | ||
### Prerequisites | ||
`browserify` is required to compile the browser-friendly versions of `sdk-wallet`. It can be installed as follows: | ||
``` | ||
npm install --global browserify | ||
``` | ||
### Building the library | ||
@@ -52,8 +44,2 @@ | ||
Make sure you have the package `http-server` installed globally. | ||
``` | ||
npm install --global http-server | ||
``` | ||
In order to run the tests **in the browser**, do as follows: | ||
@@ -60,0 +46,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14
1395
83469
48