aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/config-manager.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-04 02:59:20 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-04 02:59:20 +0800
commitbd2a429a85d27fc82e76115ec136640cbfecf9e1 (patch)
treea8f085a3ef359b69bc4f2f65e6c408514019c321 /app/scripts/lib/config-manager.js
parent9ca3c57339571c43106306a6b4fadcfad40d3c19 (diff)
downloadtangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar.gz
tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar.zst
tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.zip
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.
Diffstat (limited to 'app/scripts/lib/config-manager.js')
-rw-r--r--app/scripts/lib/config-manager.js6
1 files changed, 4 insertions, 2 deletions
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)