aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-12-04 08:36:27 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-12-04 08:36:27 +0800
commite592b27f771839fecd718c21fc1045c695a14f85 (patch)
treebc75f3f64681b582cb86360062dbc6f167343ac3 /packages/instant/src/redux
parent2601d16efbb1e85eadca459e5dc64e78099e738a (diff)
downloaddexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.tar
dexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.tar.gz
dexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.tar.bz2
dexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.tar.lz
dexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.tar.xz
dexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.tar.zst
dexon-sol-tools-e592b27f771839fecd718c21fc1045c695a14f85.zip
fix(instant): render token selector when only one asset is available
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r--packages/instant/src/redux/async_data.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts
index 18f671cd7..c67b222d1 100644
--- a/packages/instant/src/redux/async_data.ts
+++ b/packages/instant/src/redux/async_data.ts
@@ -32,7 +32,8 @@ export const asyncData = {
const assetBuyer = providerState.assetBuyer;
try {
const assetDatas = await assetBuyer.getAvailableAssetDatasAsync();
- const assets = assetUtils.createAssetsFromAssetDatas(assetDatas, assetMetaDataMap, network);
+ const deduplicatedAssetDatas = _.uniq(assetDatas);
+ const assets = assetUtils.createAssetsFromAssetDatas(deduplicatedAssetDatas, assetMetaDataMap, network);
dispatch(actions.setAvailableAssets(assets));
} catch (e) {
const errorMessage = 'Could not find any assets';