Make single letter variables more verbose

feature/default_network_editable
Dan Finlay 8 years ago
parent 25d0ac1476
commit af2c7004b0
  1. 2
      app/scripts/keyring-controller.js
  2. 8
      app/scripts/keyrings/simple.js

@ -508,7 +508,7 @@ module.exports = class KeyringController extends EventEmitter {
if (typeof password === 'string') {
this.password = password
}
return Promise.all(this.keyrings.map((keyring, i) => {
return Promise.all(this.keyrings.map((keyring) => {
return Promise.all([keyring.type, keyring.serialize()])
.then((serializedKeyringArray) => {
// Label the output values on each serialized Keyring:

@ -20,10 +20,10 @@ class SimpleKeyring extends EventEmitter {
}
deserialize (privateKeys = []) {
this.wallets = privateKeys.map((w) => {
const stripped = ethUtil.stripHexPrefix(w)
const b = new Buffer(stripped, 'hex')
const wallet = Wallet.fromPrivateKey(b)
this.wallets = privateKeys.map((privateKey) => {
const stripped = ethUtil.stripHexPrefix(privateKey)
const buffer = new Buffer(stripped, 'hex')
const wallet = Wallet.fromPrivateKey(buffer)
return wallet
})
return Promise.resolve()

Loading…
Cancel
Save