@rango-dev/widget-embedded 0.17.1-next.20 → 0.17.1-next.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"SelectBlockchainPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectBlockchainPage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,qBAqDpD"}
1
+ {"version":3,"file":"SelectBlockchainPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectBlockchainPage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,qBA+DpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.17.1-next.20",
3
+ "version": "0.17.1-next.21",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "@rango-dev/queue-manager-core": "^0.22.1-next.0",
24
24
  "@rango-dev/queue-manager-rango-preset": "^0.22.1-next.6",
25
25
  "@rango-dev/queue-manager-react": "^0.22.1-next.0",
26
- "@rango-dev/ui": "^0.22.1-next.10",
26
+ "@rango-dev/ui": "^0.22.1-next.11",
27
27
  "@rango-dev/wallets-react": "^0.8.1-next.3",
28
28
  "@rango-dev/wallets-shared": "^0.21.1-next.3",
29
29
  "bignumber.js": "^9.1.1",
@@ -1,5 +1,9 @@
1
1
  import { i18n } from '@lingui/core';
2
- import { Divider, SelectableCategoryList } from '@rango-dev/ui';
2
+ import {
3
+ Divider,
4
+ getCountCategories,
5
+ SelectableCategoryList
6
+ } from '@rango-dev/ui';
3
7
  import React, { useState } from 'react';
4
8
 
5
9
  import { BlockchainList } from '../components/BlockchainList';
@@ -23,22 +27,32 @@ export function SelectBlockchainPage(props: PropTypes) {
23
27
  const fetchStatus = useAppStore().fetchStatus;
24
28
 
25
29
  const blockchains = useAppStore().blockchains({
26
- type: type,
30
+ type: type
27
31
  });
28
32
 
33
+ const countActiveCategories = getCountCategories(blockchains);
34
+
35
+ const showCategory = countActiveCategories !== 1;
36
+
29
37
  return (
30
38
  <Layout
31
39
  header={{
32
- title: i18n.t(`Select Blockchain`),
40
+ title: i18n.t(`Select Blockchain`)
33
41
  }}>
34
42
  <Divider size={12} />
35
- <SelectableCategoryList
36
- setCategory={setBlockchainCategory}
37
- category={blockchainCategory}
38
- blockchains={blockchains}
39
- isLoading={fetchStatus === 'loading'}
40
- />
41
- <Divider size={24} />
43
+
44
+ {showCategory && (
45
+ <>
46
+ <SelectableCategoryList
47
+ setCategory={setBlockchainCategory}
48
+ category={blockchainCategory}
49
+ blockchains={blockchains}
50
+ isLoading={fetchStatus === 'loading'}
51
+ />
52
+ <Divider size={24} />
53
+ </>
54
+ )}
55
+
42
56
  <SearchInput
43
57
  value={searchedFor}
44
58
  autoFocus