diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-10 07:09:50 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-10 07:09:50 +0800 |
commit | b296640f1b2e8cb808297715146a9370ff4f41ec (patch) | |
tree | 592beeb904d646a3a0789768a3ad4af4e34cd876 | |
parent | 9f6c04055419f54a730bcbd3f1da4c5f992db94d (diff) | |
download | tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.tar tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.tar.gz tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.tar.bz2 tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.tar.lz tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.tar.xz tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.tar.zst tangerine-wallet-browser-b296640f1b2e8cb808297715146a9370ff4f41ec.zip |
Rename functions for consistency.
-rw-r--r-- | app/scripts/controllers/address-book.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/scripts/controllers/address-book.js b/app/scripts/controllers/address-book.js index 824a256d1..3c2a73dd7 100644 --- a/app/scripts/controllers/address-book.js +++ b/app/scripts/controllers/address-book.js @@ -14,8 +14,8 @@ class AddressBookController { // PUBLIC METHODS // - setAddressList (address, name) { - return this.addToAddressList(address, name) + setAddressBook (address, name) { + return this.addToAddressBook(address, name) .then((addressBook) => { this.store.updateState({ addressBook, @@ -24,9 +24,9 @@ class AddressBookController { }) } - addToAddressList (address, name) { - let addressBook = this.getAddressList() - let index = addressBook.findIndex((element) => { return element.address === address }) + addToAddressBook (address, name) { + let addressBook = this.getAddressBook() + let index = addressBook.findIndex((element) => { return element.address === address || element.name === name }) if (index !== -1) { addressBook.splice(index, 1) } @@ -37,7 +37,7 @@ class AddressBookController { return Promise.resolve(addressBook) } - getAddressList () { + getAddressBook () { return this.store.getState().addressBook } |