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') { if (typeof password === 'string') {
this.password = password 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()]) return Promise.all([keyring.type, keyring.serialize()])
.then((serializedKeyringArray) => { .then((serializedKeyringArray) => {
// Label the output values on each serialized Keyring: // Label the output values on each serialized Keyring:

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

Loading…
Cancel
Save