Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
address selector: unique registry results
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Jan 9, 2017
1 parent f05ffd2 commit 8c2aa4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/src/ui/Form/AddressSelect/addressSelectStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import React from 'react';
import { observable, action } from 'mobx';
import { flatMap } from 'lodash';
import { flatMap, uniqBy } from 'lodash';
import { FormattedMessage } from 'react-intl';

import Contracts from '~/contracts';
Expand Down Expand Up @@ -239,6 +239,8 @@ export default class AddressSelectStore {
.filter((result) => result && !ZERO.test(result.address));
})
.then((results) => {
results = uniqBy(results, (result) => result.address);

this.registryValues = results
.map((result) => {
const lowercaseAddress = result.address.toLowerCase();
Expand Down

0 comments on commit 8c2aa4d

Please sign in to comment.