From bd2a429a85d27fc82e76115ec136640cbfecf9e1 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 3 Nov 2016 11:59:20 -0700 Subject: Fix account nicknaming bug When nicknaming, we weren't normalizing the input, and so we were retrieving with differently formatted addresses than we were persisting. --- app/scripts/lib/config-manager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/scripts/lib') diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 8f5590738..f50d95c12 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -269,13 +269,15 @@ ConfigManager.prototype.getWalletNicknames = function () { } ConfigManager.prototype.nicknameForWallet = function (account) { + const address = ethUtil.addHexPrefix(account.toLowerCase()) const nicknames = this.getWalletNicknames() - return nicknames[account] + return nicknames[address] } ConfigManager.prototype.setNicknameForWallet = function (account, nickname) { + const address = ethUtil.addHexPrefix(account.toLowerCase()) const nicknames = this.getWalletNicknames() - nicknames[account] = nickname + nicknames[address] = nickname var data = this.getData() data.walletNicknames = nicknames this.setData(data) -- cgit v1.2.3