address selector: unique registry results
This commit is contained in:
parent
f05ffd2e09
commit
8c2aa4d87c
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { observable, action } from 'mobx';
|
import { observable, action } from 'mobx';
|
||||||
import { flatMap } from 'lodash';
|
import { flatMap, uniqBy } from 'lodash';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
import Contracts from '~/contracts';
|
import Contracts from '~/contracts';
|
||||||
@ -239,6 +239,8 @@ export default class AddressSelectStore {
|
|||||||
.filter((result) => result && !ZERO.test(result.address));
|
.filter((result) => result && !ZERO.test(result.address));
|
||||||
})
|
})
|
||||||
.then((results) => {
|
.then((results) => {
|
||||||
|
results = uniqBy(results, (result) => result.address);
|
||||||
|
|
||||||
this.registryValues = results
|
this.registryValues = results
|
||||||
.map((result) => {
|
.map((result) => {
|
||||||
const lowercaseAddress = result.address.toLowerCase();
|
const lowercaseAddress = result.address.toLowerCase();
|
||||||
|
Loading…
Reference in New Issue
Block a user