jwallet-web-keystore
Advanced tools
Comparing version
@@ -238,8 +238,10 @@ 'use strict'; | ||
id = _getWallet7.id, | ||
isReadOnly = _getWallet7.isReadOnly, | ||
name = _getWallet7.name, | ||
salt = _getWallet7.salt, | ||
type = _getWallet7.type, | ||
name = _getWallet7.name, | ||
address = _getWallet7.address, | ||
salt = _getWallet7.salt, | ||
encrypted = _getWallet7.encrypted; | ||
encrypted = _getWallet7.encrypted, | ||
isReadOnly = _getWallet7.isReadOnly, | ||
customType = _getWallet7.customType, | ||
bip32XPublicKey = _getWallet7.bip32XPublicKey; | ||
@@ -249,15 +251,11 @@ var walletData = { | ||
name: name, | ||
type: type, | ||
type: customType, | ||
readOnly: isReadOnly ? 'yes' : 'no' | ||
}; | ||
if (isReadOnly) { | ||
return walletData; | ||
} | ||
if (type === this.mnemonicType) { | ||
return R.assoc('mnemonic', this._decryptData(encrypted.mnemonic, password, salt))(walletData); | ||
return R.compose(R.assoc('bip32XPublicKey', bip32XPublicKey)(walletData), isReadOnly ? R.identity : R.assoc('mnemonic', this._decryptData(encrypted.mnemonic, password, salt)))(walletData); | ||
} | ||
return R.compose(R.assoc('address', address), R.assoc('privateKey', this._decryptPrivateKey(encrypted.privateKey, password, salt)))(walletData); | ||
return R.compose(R.assoc('address', address), isReadOnly ? R.identity : R.assoc('privateKey', this._decryptPrivateKey(encrypted.privateKey, password, salt)))(walletData); | ||
} | ||
@@ -264,0 +262,0 @@ }, { |
{ | ||
"name": "jwallet-web-keystore", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Library for ethereum blockchain accounts management", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
82618
0.21%1679
-0.06%