diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-11-04 02:59:20 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-11-04 02:59:20 +0800 |
commit | bd2a429a85d27fc82e76115ec136640cbfecf9e1 (patch) | |
tree | a8f085a3ef359b69bc4f2f65e6c408514019c321 /test | |
parent | 9ca3c57339571c43106306a6b4fadcfad40d3c19 (diff) | |
download | tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar.gz tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar.bz2 tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar.lz tangerine-wallet-browser-bd2a429a85d27fc82e76115ec136640cbfecf9e1.tar.xz 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 'test')
-rw-r--r-- | test/unit/keyring-controller-test.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js index 6656583e8..eed6af2c3 100644 --- a/test/unit/keyring-controller-test.js +++ b/test/unit/keyring-controller-test.js @@ -105,6 +105,17 @@ describe('KeyringController', function() { }) }) + describe('#saveAccountLabel', function() { + it ('sets the nickname', function() { + const account = addresses[0] + var nick = 'Test nickname' + const label = keyringController.saveAccountLabel(account, nick) + assert.equal(label, nick) + + const persisted = keyringController.configManager.nicknameForWallet(account) + assert.equal(persisted, nick) + }) + }) }) |